Re: How to run one php app from another? RECAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El vie, 16-06-2006 a las 15:54 -0500, Richard Lynch escribió:
> On Fri, June 16, 2006 9:25 am, Martin Alterisio wrote:
> > You can fork a new process a run the other script in the child
> > process. But
> > forking is not always available so I also use another approach:
> > emulate a
> > web page request through sockets or curl to the script I want to run.
> 
> Forking in a web environment is a Bad Idea, as documented in the manual.

This is true.  Basically you need to ensure that the child process
exits() always, or you'll have a ton of apache processes running left
behind.  Not to mention that you should not attempt to access any of the
shared resources (yes, that includes print and echo since they share the
standard output file descriptor, and obviously database connections are
included) because you're not going to get consistent results.

> 
> YMMV
> 
> -- 
> Like Music?
> http://l-i-e.com/artists.htm
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux