You are here: Re: running an exec in the background, let page go on. « All PHP « IT news, forums, messages
Re: running an exec in the background, let page go on.

Posted by Andy Jeffries on 04/28/06 11:11

On Thu, 27 Apr 2006 09:23:35 -0700, news@celticbear.com wrote:
>> run it in new window
> I'm sorry? Run it in a new window?
> As in a new browser window?
> That doesn't really solve the problem, just moves the problem to another
> browser window which must likewise remain open for 10 to 40 minutes
> while the FTP completes.
>
> Maybe there is no answer. =/

Don't lose hope, you definitely can do it. As per my earlier pointer, you
could do it by execing another PHP script that detaches from the parent
process and closes stdout (I posted code in that thread to do it) then
take your long action from there.

Another advantage is you don't need to worry about trying to use & to make
your .sh exec go in the background from that PHP script, so you could
print errors from the .sh, capture them in the PHP script and mail them to
you if you like or log them.

Cheers,


Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this 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

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