diff --git a/.htaccess b/.htaccess deleted file mode 100644 index d461ec630..000000000 --- a/.htaccess +++ /dev/null @@ -1,6 +0,0 @@ -# At least on web servers supporting the .htaccess mecanism, -# we disable session.auto_start; on other servers, users will -# get a warning that they have to disable this setting -# See also FAQ 1.36 in Documentation.html - -php_flag session.auto_start 0 diff --git a/ChangeLog b/ChangeLog index 16a9e26ca..e0bee05b5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-03-02 Marc Delisle + * libraries/session.inc.php and removed .htaccess: + bug #1411996: now we destroy an auto-started session + 2006-03-02 Michal Čihař * libraries/display_tbl.lib.php: Fix parameter to transformation (bug #1440926). diff --git a/Documentation.html b/Documentation.html index 895380af9..42fbec6fe 100755 --- a/Documentation.html +++ b/Documentation.html @@ -2544,16 +2544,7 @@ RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]

There can be many explanations to this and a look at your server's - error log file might give a clue. Here is a possible explanation.
- Since version 2.8.0, phpMyAdmin contains a .htaccess file - inside its main directory. On servers that support the htaccess feature, - this file is used to set a PHP behavior that phpMyAdmin relies on; - currently, php_flag session.auto_start 0 is used to ensure - that a session is not already active. However, on some servers, usage - of .htaccess is forbidden, therefore an internal error is - triggered. You can try to remove this .htaccess file, hoping - that the session.auto_start setting is not active on your - server. + error log file might give a clue.

diff --git a/libraries/session.inc.php b/libraries/session.inc.php index 8e0ce570c..fb60ff997 100644 --- a/libraries/session.inc.php +++ b/libraries/session.inc.php @@ -30,8 +30,8 @@ if (!@function_exists('session_name')) { . '&type=' . urlencode($strError) . '&error=' . urlencode(sprintf($strCantLoad, 'session'))); exit(); -} elseif (ini_get('session.auto_start') == true) { - $cfg = array('DefaultLang' => 'en-iso-8859-1', +} elseif (ini_get('session.auto_start') == true && session_name() != 'phpMyAdmin') { +/* $cfg = array('DefaultLang' => 'en-iso-8859-1', 'AllowAnywhereRecoding' => false); // Loads the language file require_once('./libraries/select_lang.lib.php'); @@ -48,6 +48,13 @@ if (!@function_exists('session_name')) { . '&type=' . urlencode('Error') //($strError) . '&error=' . urlencode($strSessionAutostartError)); exit(); + */ + $_SESSION = array(); + if (isset($_COOKIE[session_name()])) { + setcookie(session_name(), '', time()-42000, '/'); + } + session_unset(); + @session_destroy(); } // disable starting of sessions before all settings are done