I have a PHP script on a web server that does this:
- Receives file upload
- Saves file upload
- Records upload to database
I would like actions 2 and 3 to occur atomically. There should be no scenario where 2 happens and 3 does not.
PHP scripts can time out. But are there other situations where the script could get interrupted? Can I prevent those?