ScotDiddle Posted August 31, 2009 Share Posted August 31, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/172577-session_id-with-phpini-settting-sessionautostart-1/ Share on other sites More sharing options...
ignace Posted August 31, 2009 Share Posted August 31, 2009 Will session_id($myNewID); work if autostart = 1 ? No. Quote Link to comment https://forums.phpfreaks.com/topic/172577-session_id-with-phpini-settting-sessionautostart-1/#findComment-909732 Share on other sites More sharing options...
akitchin Posted August 31, 2009 Share Posted August 31, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/172577-session_id-with-phpini-settting-sessionautostart-1/#findComment-909734 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.