From 9ff701560ff90eaff34869bc926e7a16870fe66c Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 1 Aug 2008 19:15:01 +0000 Subject: [PATCH] bug #2032707 [core] PMA does not start if ini_set() is disabled --- ChangeLog | 1 + export.php | 2 +- libraries/session.inc.php | 22 +++++++++++----------- phpmyadmin.css.php | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4471b0cfc..0be9d8bd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -72,6 +72,7 @@ danbarry 2.11.9.0 (not yet released) - bug #2031221 [auth] Links to version number on login screen +- bug #2032707 [core] PMA does not start if ini_set() is disabled 2.11.8.0 (2008-07-28) - patch #1987593 [interface] Table list pagination in navi, diff --git a/export.php b/export.php index 1da5c972e..e23d98615 100644 --- a/export.php +++ b/export.php @@ -343,7 +343,7 @@ if (!$save_on_server) { // Download // (avoid rewriting data containing HTML with anchors and forms; // this was reported to happen under Plesk) - ini_set('url_rewriter.tags',''); + @ini_set('url_rewriter.tags',''); if (!empty($content_encoding)) { header('Content-Encoding: ' . $content_encoding); diff --git a/libraries/session.inc.php b/libraries/session.inc.php index 2ac024ee1..756f2523f 100644 --- a/libraries/session.inc.php +++ b/libraries/session.inc.php @@ -33,25 +33,25 @@ if (!@function_exists('session_name')) { session_set_cookie_params(0, PMA_Config::getCookiePath() . '; HttpOnly', '', PMA_Config::isHttps()); -// cookies are safer -ini_set('session.use_cookies', true); +// cookies are safer (use @ini_set() in case this function is disabled) +@ini_set('session.use_cookies', true); // but not all user allow cookies -ini_set('session.use_only_cookies', false); -ini_set('session.use_trans_sid', true); -ini_set('url_rewriter.tags', +@ini_set('session.use_only_cookies', false); +@ini_set('session.use_trans_sid', true); +@ini_set('url_rewriter.tags', 'a=href,frame=src,input=src,form=fakeentry,fieldset='); //ini_set('arg_separator.output', '&'); // delete session/cookies when browser is closed -ini_set('session.cookie_lifetime', 0); +@ini_set('session.cookie_lifetime', 0); // warn but dont work with bug -ini_set('session.bug_compat_42', false); -ini_set('session.bug_compat_warn', true); +@ini_set('session.bug_compat_42', false); +@ini_set('session.bug_compat_warn', true); // use more secure session ids -ini_set('session.hash_function', 1); +@ini_set('session.hash_function', 1); // some pages (e.g. stylesheet) may be cached on clients, but not in shared // proxy servers @@ -73,9 +73,9 @@ if (! isset($_COOKIE[$session_name])) { ob_start(); $old_display_errors = ini_get('display_errors'); $old_error_reporting = error_reporting(E_ALL); - ini_set('display_errors', 1); + @ini_set('display_errors', 1); $r = session_start(); - ini_set('display_errors', $old_display_errors); + @ini_set('display_errors', $old_display_errors); error_reporting($old_error_reporting); unset($old_display_errors, $old_error_reporting); $session_error = ob_get_contents(); diff --git a/phpmyadmin.css.php b/phpmyadmin.css.php index d9c2c5d1e..32ae55068 100644 --- a/phpmyadmin.css.php +++ b/phpmyadmin.css.php @@ -19,7 +19,7 @@ require_once './libraries/sqlparser.lib.php'; // when zlib_compression is on if (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER == '6' && (ini_get('zlib.output_compression'))) { - ini_set('zlib.output_compression', 'Off'); + @ini_set('zlib.output_compression', 'Off'); } if ($GLOBALS['text_dir'] === 'ltr') {