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

 

 

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.

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.