Daniel Lorch wrote:
> Hi,
>
> > Eric Liedtke <[EMAIL PROTECTED]>
> > [..] However, I am a little in the dark on what my options
> > are for spawning off a new process/thread that will continue working in
> > the background so the exported function can return in the script and go
> > on it's merry way. I'm hoping a more experienced crowd might have
> > some suggestions for an implementation of this type. Any pointers to
> > more info, modules that do something similiar or suggestions would be
> > very welcome. [..]
>
> The most reasonable way of doing this is to write a *seperate* daemon
> which completes this task. Your PHP script would then connect to this
> daemon via an interface (sockets).
>
Thanks for the info. Just to clarify, for me, my daemon would have to be
started and stopped independently of php and would merely expose a
socket interface for control functionality? My ultimate goal was to wrap
libshout up and expose an integrated mp3 streamer into php and to build
a "personalized radio station" app around it. Everything that is out there has
so many pieces I was hoping to make it all available under php only, but I suppose
that will have to wait.I was looking to reproduce "Radio Free Pete" a Zope app,
so I wouldn't have to run an app server. Thanks again.
-eric
>
> There are "Process Control" Functions http://www.php.net/manual/en/ref.pcntl.php
> which would allow you to fork a new process, but it is
>
> 1. experimental
> 2. only available for CGI/CLI and not mod_php
>
> .. and overall not a good idea. Your script would anyway have to wait
> for the PINGs to complete - whether it's in a seperate process or not.
>
> daniel
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php