tags:

views:

35

answers:

2

Hi

I am facing an Error : execution time for the action exceeded .. secs. In PHP. I am using set_time_limit(0); and it is working fine on windows. but it is not working on linux.

what might be the reason?

Thanks & Regards

Rahul

A: 

Most likely because the host PHP doesn't allow you to override their settings. Remember, set_time_limit() overrides a default. Its something you might want to take up with your host (or, perhaps, see if you can speed things up).

phpinfo() should tell you, either way. Safe mode or Suhosin would explain it.

NB: I have no idea if you are making blocking calls that would be fine on Windows but problematic on Linux. A little debug output, or snips of code around the point where it stalls would be helpful. It could be that set_time_limit() has no influence on proper behavior on Windows. Without code, its hard to say :)

Tim Post
+1  A: 

See here :

http://php.net/manual/en/function.set-time-limit.php

This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

are you in safe mode ?

remi bourgarel