August 25th, 2000, 10:44 AM
I have a Linux machine with PHP installed in CGI mode. I use it for shell scripts, so there isn't even a web server on this machine.
I would like to use PHP to write a daemon.
So riddle me this:
How does one remove the 30-second execution limit in PHP?
August 25th, 2000, 01:01 PM
Does it work to change the php.ini file where it says max execution time (or something like that) from 30 to what every you want.
I don't really know about shell scripts but in scripts for the web you can add
"set_time_limit(600);" (without quotes) and change 600 to how many seconds you want.
September 11th, 2000, 01:41 PM
Hmm, I couldn't find "php.ini"; just "php.ini-dist" and "php.ini-optimized"
I tried changing each of these, but it didn't help.
Any other ideas?
September 12th, 2000, 12:40 AM
Try reading the comment header of the file, or the PHP install documentation. Things like that can help sometimes
It basically says the file needs to be named php.ini to work, and it needs to be in the php current working directory. (usually /usr/local/lib)
So copy php.ini-dist or php.ini-optimized to /usr/local/lib. Then you can change the execution time limits and many other things.
September 12th, 2000, 03:15 AM
set_time_limit(0) will remove the time limit alltogether