Reply to Re: Starting a PHP script in the background?

Your name:

Reply:


Posted by David Gillen on 09/22/06 15:59

An noise sounding like Jonah Bishop said:
> What is the appropriate way to start a PHP script in the background? I
> have a script that manipulates image data, and it takes a long time to
> run. I'd like to send this process to the background at the appropriate
> time, so that it can go do its job without holding up the user.
>
> I've seen something like this used:
>
> system("php myscript.php &");
>
> But the PHP manual entry for the system() function call indicates the
> following:
>
> "Note: If you start a program using this function and want to leave it
> running in the background, you have to make sure that the output of
> that program is redirected to a file or some other output stream or
> else PHP will hang until the execution of the program ends."
>

system("php myscript.php & >> myscript.logfile");

Will append any output each time to myscript.logfile

D.
--

/(bb|[^b]{2})/
Trees with square roots don't have very natural logs.
What's the difference between ignorance and apathy? Who knows? Who cares?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация