Jump to content

session_id() with php.ini settting session.autostart = 1


ScotDiddle

Recommended Posts

Hello All,

 

php.net says:

 

"If id  is specified, it will replace the current session id.    session_id() needs to be called before session_start() for that purpose. "

 

Will session_id($myNewID); work if autostart = 1 ? 

 

I've read about other built-in functions with the same "requirement" , so this is really more of a general question... Google was no help, nor a search of this forum.

 

I appreciate any input / pointers / discussion.

 

Scot L. Diddle, Richmond VA

 

 

Link to comment
Share on other sites

this would be a fairly quick test - echo the session ID before using session_id(), then echo it afterward and see if it has changed. i have a feeling it would not work in the case of autostart being on, but it never hurts to check.

Link to comment
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.