Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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.

share|improve this answer
    
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 9:10
    
Added an edit, I assume you wanted to increase the max execution time? That should work. –  Sašo Apr 25 '12 at 9: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 9: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 9:31
    
Yep, thanks I did check and safe mode is off. –  giorgio79 Apr 26 '12 at 10:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.