dragunu Posted April 1, 2008 Share Posted April 1, 2008 hello, currently i have a script which loops to execute an external perl script. The loop depends on the amount of data you input through STDIN using webmin's custom commands. Now, I am encountering the problem that after some data inputted, the script is timing out. I have searched thru php.net manual, and found out that set_time_limit() & max_execution_time effect only the execution time of the script itself. Now the default timeout is 30 seconds. And the script ( including the shell_exec(perl.pl) ) keeps running for more than 4 minutes. Does this mean that the 30 second default ignore the actual time spent on running external scripts? In other words, does this mean, that if I increase the set_time_limit() default value, the script would take longer to timeout? will Quote Link to comment Share on other sites More sharing options...
vbnullchar Posted April 1, 2008 Share Posted April 1, 2008 set it to zero.. Quote Link to comment Share on other sites More sharing options...
redarrow Posted April 1, 2008 Share Posted April 1, 2008 read the manual it your best friend ok m8. url http://uk.php.net/set_time_limit Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini. When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out. The maximum execution time, in seconds. If set to zero, no time limit is imposed. Quote Link to comment Share on other sites More sharing options...
dragunu Posted April 1, 2008 Author Share Posted April 1, 2008 thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.