PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a long PHP script and I want to be able to write to disk the variable created in the session before the script ends
(In fact it seems that PHP even wait until the end of the execution of a function called by register_shutdown_function in order to write the changes to disk...).
Is there a solution, except rewriting personnal handlers of sessions ?
I order to improve performance, I have to grant resources on a other machine where the client will be redirected.
In fact, a "home prefetch function" is called by register_shutdown_function() at the end of a script PHP.
But if the client reloads its page, my function can be executed several times for a client.
I only wanted to set a flag in the session (even without mutex) to tell that my prefetch function is beeing executed (but the varariable session are only written when the script PHP is over i.e., after the return of my prefetch function )...