Jump to content

Recommended Posts

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!

  • 3 months later...

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

  • 4 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.