Re: execution time

From: Date: Fri, 27 Jul 2001 19:32:32 +0000
Subject: Re: execution time
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-59995@lists.php.net to get a copy of this message
> I have a php script that runs every 30 minutes. It takes the contents of a > directory (which is constantly being updated) and dumps them into a mysql > database. Recently this directory has become increasingly large and the php > script only updates a portion of it before it stops execution. > > To run the php script I use a lynx command in a crontab. I'm running suse > linux and apache on both machines (the machine containting the directory > and the other machine containing the database). Sounds like you're trying to hammer a nail with a flower pot :) You should compile and install the cgi version of php, which can be run from the command line like perl, with php -q. Remember that you'll need to declare the location of the php app just like in perl scripts. :) > I've tried changing the max execution time in php.ini file but it appears > to have no affect. When I took the php script and divided it into portions > and ran them one at a time it worked (except for one portion of the > script). the execution time of the script doesn't matter to me, I just need > it to run. It's been a while since I looked into this, but I _think_ setting it to 0 makes it infinite. I think. > When I run the php script through a browser, and the script doesn't > complete, I get a 'page cannot be displayed' message (while I am expecting > a 'fatal error, exceeded max execution time' error message). > > Maybe it could be fixed by using something other than lynx to run the php > script internally, but I don't know of any alternatives. > > hope someone can help.. cron with command line php :) _a

« previous php.general (#59995) next »