User Tools

Site Tools

Please note, that this is an old archived version of this site. Check out the new version at!

Set PHP Variables in .htaccess Files

If your PHP scripts run longer than the maximum execution time set by your webhoster, then you will see a message like this:

Fatal error: Maximum execution time of 30 seconds exceeded in ...

To override the default for your webspace, you can use the php_value directive in a .htaccess file.

To set the value to “0”, which means no limit, add this line:

php_value max_execution_time 0

I suggest to either set it to unlimited, run the long running script and then comment it out or set it to some reasonable value like 120 or 300, depending on the time the script usually needs.

blog/2010/set_php_variables_htaccess_files.txt · Last modified: 2010-04-29 14:07 (external edit)