From 2e61ea7d9d6d1efab2c70b73cfd26d756c99afbc Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 14 Feb 2007 15:21:32 +0000 Subject: [PATCH] white page after uploading a 700 Kio BLOB --- ChangeLog | 3 +++ libraries/common.lib.php | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dd79091cd..6541a95a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog $Id$ $HeadURL$ +2007-02-14 Marc Delisle + * libraries/common.lib.php: white page after uploading a 700 Kio BLOB + 2007-02-13 Sebastian Mendel * libaries/PMA_Sql.class.php: added much more functionality diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 45154f4a5..13eb81552 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1619,7 +1619,15 @@ if (typeof(window.parent) != 'undefined' echo '
' . "\n"; echo ' ' . $GLOBALS['strSQLQuery'] . ':'; echo '
'; - echo ' ' . $query_base; + // when uploading a 700 Kio binary file into a LONGBLOB, + // I get a white page, strlen($query_base) is 2 x 700 Kio + // so put a hard limit here (let's say 1000) + $max_characters = 1000; + if (strlen($query_base) > $max_characters) { + echo ' ' . substr($query_base,0,$max_characters) . '[...]'; + } else { + echo ' ' . $query_base; + } //Clean up the end of the PHP if (!empty($GLOBALS['show_as_php'])) {