[imp] MySQL session handler problems - PHP bug and more

Mike Baptiste baptiste@cc-concepts.com
Sun, 10 Mar 2002 16:45:18 -0500


Still digging though diffs of session.c for PHP and more.  Butin the 
meantime, I was able to fool PHP into returning the login page.

I simply commented out the session_start and redirect the browser to a 
vanilla login.php - this kills the existing thread, thus there is no SID 
conflict:

In login.php:

      86         if ($registry->getMethod('auth/logout') == 
$registry->getApp()) {
      87             include_once HORDE_BASE . '/lib/Auth.php';
      88             Auth::clearAuth();
      89             session_destroy();
-    90 //            @session_start();
+     91             header('Location: 
https://our.server.hostname/horde/imp/login.php');
+     92             exit;
      93         }

Its not pretty, but it works :)  The MySQL session handling is working 
just fine.  So until PHP can handle the creation of a new session 
immediately after one was destroyed using the same session ID in teh 
same thread, I'll stick with this.  I could also try to force PHP to 
establish a new session using a new session ID, but that would be more 
wasted CPU and bandwidth since I'd have to unset the cookie and then 
reset it with a new session ID as the login.php page finished loading.

Mike

Mike Baptiste wrote:
> I've got Horde 2.0, IMP 3.0, and Turba 1.0 running on Linux with PHP 
> 4.1.2 and it works well.  However, in anticipation of our load, I was 
> trying to get MySQL session handling working.
> 
> I settled on a pear based handler (http://pearsession.sf.net) which 
> seemed clean and well written.  However, everytime I logout, I get a 
> blank page until I click reload.