Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.