I have a php script that need to be processed for one to 5 hours (sending newsletters to our customers). I tried both set_time_limit(2000);
and ini_set('max_execution_time', 360000);
but neither works. They work perfectly on the XAMPP local server, but they do not work on our dedicated server (Unix & Apache). I also changed the Apache timeout to 300 (which was 50), yet after 30 seconds of script running, it returns this:
Internal Server Error Page (Error 500)
I have no idea if there is any other place for timeout and/or why the server does not honor the ini_set()
or set_time_limit()
functions. We are using Unix CentOS 6 and Plesk 11.9 as server. I also changed the default php.ini max_execution_time
, and it works...
I read many articles and forums, yet I don't know why this happens. I appreciate your help.