TFT2012 Posted June 29, 2012 Share Posted June 29, 2012 I have a part of php code (in Apache) which uses file_get_contents() to get data through a service url (in IIS7). The IIS 7 will need about 30 minutes to give the data back. Then I need to keep this execution in my Apache server for about 30 minutes. I have set the max_execution_time to 3600 in PHP, how can I do it in Apache? I added TimeOut 3600 to httpd.conf, but it seems dosen't work. Because after about 30 seconds running, the web page will ask me to download the php file instead of keep running the script. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/264994-how-to-setup-the-execution-time-in-apache/ Share on other sites More sharing options...
jonsjava Posted October 28, 2012 Share Posted October 28, 2012 I hate to ask, but did you restart apache after changing the php.ini and the httpd.conf file? service httpd reload Also, edit this line: KeepAliveTimeout 30 So that it says: KeepAliveTimeout 3600 With that said, it would be best to CLI this, so you don't have to worry about the Apache timeout: /usr/bin/php -q /path/to/php_file.php Quote Link to comment https://forums.phpfreaks.com/topic/264994-how-to-setup-the-execution-time-in-apache/#findComment-1388223 Share on other sites More sharing options...
trq Posted October 28, 2012 Share Posted October 28, 2012 Talking about transactions taking times such as "half an hour", I suggest you find another protocol. Http really isn't cut out for what your doing. Quote Link to comment https://forums.phpfreaks.com/topic/264994-how-to-setup-the-execution-time-in-apache/#findComment-1388230 Share on other sites More sharing options...
txmedic03 Posted November 24, 2012 Share Posted November 24, 2012 I've gotta go with trq on this one. Half an hour? WTF?! Why are you doing a half hour execution over http? Quote Link to comment https://forums.phpfreaks.com/topic/264994-how-to-setup-the-execution-time-in-apache/#findComment-1394696 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.