Dropping a connection during a php script execution

Hi

I have not yet found a definitive answer to this so aplogies if it’s obvious. I want to know what happens to my php script running several dependant MySQL queries if the user loses their internet connection half way through. Is this treated by the server the same as ignore_user_abort=yes statement set in the php.ini file or not.

Eg. a script of mine the user enters lots of data and the script runs for around 15 seconds before a refresh occurs on the browser with the new info. This new data has been written to a mysql database

The script that ran is a sequence of MySQL statements deletions and updates of a few thousand elements and has occasionally left all elements empty if the users internet connection fails half way through.This has lead to complete loss of all data both what was there and what was intended. Even if I use transactional statement (begin, commit, rollback) this would not work because the user has disconnected so the final statement is lost. Or is it?

Could someone tell me what the default is and if the use of ignore_user_abort doesn’t just mean pressing the stop button but also works on internet connection loss. I would like the script to finish and if I can keep it going regardless of user connection or not I can use the transactional statements of rollback/commit to ensure acccuracy at the server end

Many thanks

Ozzy

Thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service