2

It seems set_time_limit function call has no effect when php is running with mod_fcgid (the default in webmin). Can someone tell me how to make it work?

giorgio79
  • 1,747
  • 9
  • 25
  • 36

1 Answers1

1

Make sure you're editing /etc/php5/cgi/php.ini and that after editing it, you restart php-cgi. The command for that should be sudo /etc/init.d/php-fastcgi restart

Edit:

To increase timelimit, you'll need to find max_execution_time in your php.ini. Default value is 30 seconds. This is required if PHP is running in safe mode.

To disable safe mode, search for safe_mode in php.ini and set it to off.

See PHP Runtime Configuration page for more info on that.

Sašo
  • 1,464
  • 2
  • 9
  • 13
  • Thanks Saso, perhaps I should have been clearer as I was thinking of the php function call set_time_limit, will clarify this – giorgio79 Apr 25 '12 at 09:10
  • Added an edit, I assume you wanted to increase the max execution time? That should work. – Sašo Apr 25 '12 at 09:20
  • Much appreciated for the extra info. I really would like to use set_time_limit so I am only increasing the time for one script instead of the entire server. So it is not possible to use it with fcgid? – giorgio79 Apr 25 '12 at 09:23
  • Remembered another thing: check if php is running in safe mode - though safe mode was removed in PHP 5.4 – Sašo Apr 25 '12 at 09:31