Reputation: 763
Is it possible to set up a different timeout for specific URLs. For instance, I would like that http://myserver.com/save_message
have a timeout of 2 seconds, differently than my server default.
This URL calls a PHP script. Is the PHP script terminated automatically when the timeout happens?
Upvotes: 1
Views: 1842
Reputation: 333
You can set timeout by below list different ways:
For example you can place this values in common settings file which is being included in all files
ini_set('max_execution_time', 300); //300 seconds = 5 minutes
php_value max_execution_time 300
As well if you have access server access than you can set in apache configuration file. If you do changes in server configuration file than you need to restart apache service.
i.e php_value post_max_size 5M php_value upload_max_filesize 5M php_value memory_limit 128M php_value max_execution_time 300 php_value max_input_time 300 php_value session.gc_maxlifetime 1200
I hope these would be helpful for you.
Upvotes: 1