Reopening a session in PHP
How do I reopen a session in PHP without getting header already sent warnings? After setting all the session vars I like to set, I close the session with session_write_close() . I do this, because as long as the session is open, there may be only one active connection from the same client. But I like to have multiple parallel ones. However if I like to set another session variable at a later point, I need to reopen the session with session_start() once again. This works, but as I already send code to the client it prints "headers already sent"-warnings. Why is it trying to set the cookie again