Jump to content

session_regenerate_id troubles


jdlev

Recommended Posts

For whatever reason, session_regenerate_id() screwed up my authentication system in php.  If I remove session_regenerate_id(), it works just fine, and creates 1 session file that contains data in the temp folder.  If I leave session_regenerate_id() in there, it produces 2 session files after login, and won't allow access to the secured areas - it says authenticaion denied.  Of the 2 session files it produces, one has data in it which is correct.  The other has no data in it. 

 

There's not really any code, and I've never used session_regenerate_id() before so I'm not sure if I'm using the wrong syntax? 

 

Basically, what happens is that there is an if statement where if the user's name & password are found in the database, it regenerates the session id...so it's basially like this: 

 

if(user in database & password good)

{

session_regenerate_id();

}

Link to comment
https://forums.phpfreaks.com/topic/177040-session_regenerate_id-troubles/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.