bug #1411996, support session.autostart=1 without the need of .htaccess
This commit is contained in:
@@ -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
|
|
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2006-03-02 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* libraries/session.inc.php and removed .htaccess:
|
||||||
|
bug #1411996: now we destroy an auto-started session
|
||||||
|
|
||||||
2006-03-02 Michal Čihař <michal@cihar.com>
|
2006-03-02 Michal Čihař <michal@cihar.com>
|
||||||
* libraries/display_tbl.lib.php: Fix parameter to transformation (bug
|
* libraries/display_tbl.lib.php: Fix parameter to transformation (bug
|
||||||
#1440926).
|
#1440926).
|
||||||
|
@@ -2544,16 +2544,7 @@ RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
|
|||||||
</h4>
|
</h4>
|
||||||
<p>
|
<p>
|
||||||
There can be many explanations to this and a look at your server's
|
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.<br />
|
error log file might give a clue.
|
||||||
Since version 2.8.0, phpMyAdmin contains a <tt>.htaccess</tt> 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, <tt>php_flag session.auto_start 0</tt> is used to ensure
|
|
||||||
that a session is not already active. However, on some servers, usage
|
|
||||||
of <tt>.htaccess</tt> is forbidden, therefore an internal error is
|
|
||||||
triggered. You can try to remove this <tt>.htaccess</tt> file, hoping
|
|
||||||
that the <tt>session.auto_start</tt> setting is not active on your
|
|
||||||
server.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,8 +30,8 @@ if (!@function_exists('session_name')) {
|
|||||||
. '&type=' . urlencode($strError)
|
. '&type=' . urlencode($strError)
|
||||||
. '&error=' . urlencode(sprintf($strCantLoad, 'session')));
|
. '&error=' . urlencode(sprintf($strCantLoad, 'session')));
|
||||||
exit();
|
exit();
|
||||||
} elseif (ini_get('session.auto_start') == true) {
|
} elseif (ini_get('session.auto_start') == true && session_name() != 'phpMyAdmin') {
|
||||||
$cfg = array('DefaultLang' => 'en-iso-8859-1',
|
/* $cfg = array('DefaultLang' => 'en-iso-8859-1',
|
||||||
'AllowAnywhereRecoding' => false);
|
'AllowAnywhereRecoding' => false);
|
||||||
// Loads the language file
|
// Loads the language file
|
||||||
require_once('./libraries/select_lang.lib.php');
|
require_once('./libraries/select_lang.lib.php');
|
||||||
@@ -48,6 +48,13 @@ if (!@function_exists('session_name')) {
|
|||||||
. '&type=' . urlencode('Error') //($strError)
|
. '&type=' . urlencode('Error') //($strError)
|
||||||
. '&error=' . urlencode($strSessionAutostartError));
|
. '&error=' . urlencode($strSessionAutostartError));
|
||||||
exit();
|
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
|
// disable starting of sessions before all settings are done
|
||||||
|
Reference in New Issue
Block a user