Re: PHP as daemon process
| From: | Paul Chvostek | Date: | Tue, 15 Apr 2003 21:17:53 +0000 |
| Subject: | Re: PHP as daemon process | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144025@lists.php.net to get a copy of this message | ||
On Tue, Apr 15, 2003 at 11:52:52PM +0300, Ilja Polivanovas wrote:
>
> Hallo all
Hallo.
> Does anybody know how to run PHP script via PHP-CLI as daemon process in
> Linux or FreeBSD?
Well, which? Are you running it from a CLI, or as a daemon? Or are you
talking about launching the daemon from a CLI?
Making a PHP script act as a daemon is pretty straightforward. Since
the script can pass data through stdio, you can run a daemon that gets
launched from inetd (or equivalent). If you want the script to accept
TCP socket connections, a close read of http://www.php.net/sockets
should help to dispel the fog. The page even includes a pair of client
and server script examples.
In other words, RTFM.
--
Paul Chvostek <paul@it.ca>
Operations / Abuse / Whatever
it.canada, hosting and development http://www.it.ca/