I have a PHP report which iterates through hundreds of records and for each record, executes a number of other MySQL queries. It's a complicated report but I haven't been able to streamline the logic any further. It doesn't have to be executed frequently so waiting a while, up to 20 minutes minutes, is acceptable.
The problem is, I am getting a "500 Internal Server Error" and the script times out after 10 minutes (almost exactly)
- I have a hosting plan with a dedicated server at DreamHost.com
- Dreamhost uses a "phprc" file in lieu of "php.ini"
- I have the following line in the phprc file: max_execution_time = 1500
- Checking the php parameters Phpinfo(), I see: max_execution_time2400
How can I ensure that the script will run to completion?
Could the problem be that the browser is timing out because it's not getting anything from the server?
Related, does anyone know of a javascript "server is working" sort of script so that the user sees that the process is still running?
Thanks