Mantis - Quercus
Viewing Issue Advanced Details
2758 minor always 06-28-08 03:57 07-01-08 13:55
stephaneeybert  
nam  
normal  
closed  
fixed  
none    
none 3.2.0  
0002758: Starting the session
I'm running into an issue when using the php function session_start as in

session_start();

This happens only when running the php application in Resin/Quercus.

It does not happen when running it directly in PHP.

I traced the program execution and my conclusion is that calling this php function will give the error message, even when calling it for the first time in the program execution.

I found out why my session_start function would give the error message.

This is because just before calling this function I would call the function session_regenerate_id(true);
as in:

// For security reasons renew the session id
session_regenerate_id(true);

session_start();

Somehow, and contrary to PHP4, Resin seems to start a session when calling the function session_regenerate_id(true)

So I removed the call to session_regenerate_id(true); and it now works fine.
I also tried to call session_regenerate_id(false); to see if it would give some interesting result.

And indeed it gave me an exception.
500 Servlet Exception
[show] java.lang.NullPointerException

Same thing when calling it like session_regenerate_id();
 session.php [^] (3,528 bytes) 06-28-08 03:57

Notes
(0003233)
nam   
07-01-08 13:55   
php/1k82
php/1k83