From: Jason R. <ja...@ho...> - 2008-08-26 13:53:56
|
You really should fork-exec that long running process and then poll a results page or something, rather than upping max_execution_time. If there is a good reason for this process to run longer than a couple seconds, then I would get it out of the way of browser interaction. Neil Rest wrote: > Yes. > > But this is my own script running on my own machine, while I watch it. Or at least watch it until I'm sure it's running right. > I'm scraping some directories, so there's nested lookups &c., and some of them really are taking 5 or 10 minutes or more on my cheesy little machine and cheesy little "fast" internet connection. > > Nervous Nellie that I am, my script now starts > > echo 'original max_execution_time = ' . ini_get('max_execution_time') . "<br />\n"; > ini_set('max_execution_time', 1200); > echo 'reset max_execution_time = ' . ini_get('max_execution_time') . "<br />\n<br />\n"; > > > At 07:43 PM 8/25/2008, "Jough Dempsey" <jou...@gm...> wrote: >> Not that the previous answers won't work, but I'm wondering if just >> taking off the safeties that are in place to stop things like scripts >> that take a minute or two is really the Right Answer. >> >> A minute in PHP execution is a LONG time. Is what the script is doing >> really that intensive, or are you just executing the same operations >> many times (e.g. if you were writing a spider that would request >> thousands of web pages)? Even then, you should be careful that your >> script isn't doing Bad Things or capitalizing things Inappropriately. >> >> Regardless, I'd suggest setting max_execution_time to a higher value, >> but not "0" which means your script just runs and runs and runs. >> > > Neil > -- > Nei...@rc... > > Never lift what you can drag, never drag what you can roll, never roll what you can leave. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss |