I have a php page that starts with a session_start() and it stores the user info in the session variables. After that it goes either into (1) the long loop script does calcula
It sounds like the problem isn't with the session in multiple windows, but with the first script running the long loop before outputting any headers, specifically the session ID cookie that other pages would need to use the same session. You should probably start the session and store your variables and then either redirect the user to another page for the long loop or output some kind of content, such as "Welcome! Starting Long Loop..."
I think I just solved it. Instead of using session_destroy()
, session_write_close()
would solve this problem.
you dont need to do that,
when u call session_start(); a session is created and it is active until the timeout in php.ini or you call session_destroy();
your error is somewhere else, do you call session_start after echo or print?