From 8d23f41628caf996f55020ad39a7e6a15e0185ba Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 15 Jun 2007 15:46:53 +0000 Subject: [PATCH] more PHP6 compatibility --- Documentation.html | 4 +++- libraries/common.inc.php | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Documentation.html b/Documentation.html index dc7e60ace..ad89a5db4 100644 --- a/Documentation.html +++ b/Documentation.html @@ -332,7 +332,9 @@ chmod o-rw config.inc.php # remove world read and write permissions

Simply copy ./config.inc.php from your previous installation into the newly unpacked one. Configuration files from very old versions (2.3.0 or before) may - require some tweaking as some options have been changed or removed.

+ require some tweaking as some options have been changed or removed. + For compatibility with PHP 6, remove a set_magic_quotes_runtime(0); + statement that you might find near the end of your configuration file.

You should not copy libraries/config.default.php over config.inc.php because the default configuration file diff --git a/libraries/common.inc.php b/libraries/common.inc.php index b732fda71..6a3944d86 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -48,15 +48,18 @@ if (defined('E_STRICT')) { unset($old_error_reporting); } -/** - * Avoid object cloning errors - */ -@ini_set('zend.ze1_compatibility_mode', false); +// at this point PMA_PHP_INT_VERSION is not yet defined +if (version_compare(phpversion(), '6', 'lt')) { + /** + * Avoid object cloning errors + */ + @ini_set('zend.ze1_compatibility_mode', false); -/** - * Avoid problems with magic_quotes_runtime - */ -@ini_set('magic_quotes_runtime', false); + /** + * Avoid problems with magic_quotes_runtime + */ + @ini_set('magic_quotes_runtime', false); +} /** * core functions