I am trying to figure out if there is a recommended way to check if the current session is still writable, but I cant seem to find any changes in the global var or the cookie that would seem to indicate that the session was not writable.
my make do solution was to make a function that contained:
@session_start();
is this a more elegant solution?
You could implement your own session_handler (see http://php.net/session_set_save_handler) for more control.
But the session should remain writeable throughout the lifetime of the script. session_write_close() is called automatically at script shutdown.
If session_write_close() is called manually this is probably for a reason. Restarting the session would cause a another (unnecessary) session_write.