MySql session not working

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
This is my first time using php and sessions.  I am trying to follow  
what I recently read, but it isn't working as I was expecting.  Please  
tell me what I'm doing wrong?

I have defined my session handlers in a session handler include file,  
sessions.php.  This file calls session_set_save_handler() and also calls  
session_start().  Each handler function operates correctly when I login  
- the data is put into the session table.

After successful login, the user is redirected to /path/index.php, which  
includes sessions.php.  session_start() is called again, but the  
$_SESSION global has no data.

I know the individual pieces of code are working properly, because at  
one point in the process they individually worked.  But when I put it  
all together, it just keeps going back to the login page.

Thanks in advance


Re: MySql session not working

tomb wrote:

Quoted text here. Click to load it

Hi Tom,

Nobody can answer this question based on the information you provided.
Clearly something goes wrong with your custum session handler, but how can  
we tell if we see 0 code?

Erwin Moller

Site Timeline