Set PHP Variables in .htaccess Files

  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.
  • user notice: The _custom_breadcrumbs_get_breadcrumb() function called token replacement with an array rather than a string for $text in /mnt/webc/60/17/52309417/htdocs/drupal/sites/all/modules/token/token.module on line 263.

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.