How to get set_time_limit to work?

4 posts / 0 new
Last post
#1 Thu, 06/10/2010 - 10:59
everisk

How to get set_time_limit to work?

Hi,

I notice that PHP set_time_limit doesnt work but I really need it to work on just a specific website. Is it possible to have this done?

Thank you very much!

Thu, 06/10/2010 - 12:29
andreychek

I'm not sure why using set_time_limit() from within PHP wouldn't work, unless perhaps PHP is running with safe_mode enabled (which isn't the default).

However, an alternative might be to edit ~/etc/php.ini, and set the max_execution_time variable for that particular domain.

-Eric

Mon, 06/14/2010 - 08:49
everisk

I think I got the 500 error saying that the code terminated prematurely at 20 secs. I guess that mean set_time_limit is not working. :( I had to increase the IPComm something in php.ini but that's not idea for me.

Mon, 06/14/2010 - 08:56
andreychek

Well, you might consider using CGI rather than fcgid, that may solve some of the issue.

If you go into Server Configuration -> Website Options, and change the "PHP script execution mode" to CGI, does it work for you at that point?

-Eric

Topic locked