I use PMA on several servers where I'm constantly doing development, and I have been annoyed for some time at how PMA erases $_SESSION variables set by other apps on the webserver. Why does PMA do this? Is there a workaround or configuration change that would allow PMA to coexist with other apps that use the session variables.
FYI, session.auto_start is enabled.
Logged In: YES
user_id=392727
Originator: YES
Oops, that last sentence should end in a '?'
Logged In: YES
user_id=210714
Originator: NO
See the previous discussion here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1411996&group_id=23067&atid=377408
and the patch that resulted:
http://phpmyadmin.svn.sourceforge.net/viewvc/phpmyadmin/trunk/phpMyAdmin/libraries/session.inc.php?r1=8482&r2=8704
any improvement to propose?
Logged In: YES
user_id=392727
Originator: YES
Okay, I see where the session is getting reset. In order to configure PMA's session stuff as you need, auto_start gets in the way. However, I think there's a much cleaner method to solving the problem - simply close the automatic session, rather than destroying it.
--- session.inc.php Line 32 (PMA version 2.10.3) ---
} elseif (ini_get('session.auto_start') == true && session_name() != 'phpMyAdmin') {
session_write_close();
}
----
Note that I have removed a bunch of code that destroys the existing session. Instead, this code simply closes it, allowing PMA to set up a new session and start it later. PHP does not keep the two sessions separate (named "PHPSESSID" and "phpMyAdmin"), but it means that PMA can have the session built as it desires.
Logged In: YES
user_id=210714
Originator: NO
I merged your suggested code, thanks.