Re: [PHP] daemon

2010-10-07 Thread Per Jessen
Tommy Pham wrote: > Hi, > > Does anyone have a script running as daemon on Linux/Unix (variants) > as part of your PHP application? Yeah, several. > If so, what are you using to schedule the script to run? cron? sysVinit and startproc -- Per Jessen, Zürich (12.1°C) -- PHP General Mail

Re: [PHP] daemon

2010-10-06 Thread Nathan Nobbe
On Wed, Oct 6, 2010 at 11:21 PM, Tommy Pham wrote: > Hi, > > Does anyone have a script running as daemon on Linux/Unix (variants) as > part > of your PHP application? If so, what are you using to schedule the script > to run? cron? > cron is one way to do it for scripts you schedule. for real

Re: [PHP] daemon without pcntl_fork

2009-08-22 Thread Jim Lucas
Lars Torben Wilson wrote: 2009/8/20 Jim Lucas : Lars Torben Wilson wrote: 2009/8/19 Per Jessen : Jim Lucas wrote: [snip] I probably wouldn't have chosen PHP for the first one, but there's no reason it shouldn't work. For the second one, did you mean to write "serial port"? That's a bit of

Re: [PHP] daemon without pcntl_fork

2009-08-22 Thread Lars Torben Wilson
2009/8/20 Jim Lucas : > Lars Torben Wilson wrote: >> 2009/8/19 Per Jessen : >>> Jim Lucas wrote: >> >> [snip] >> >>> I probably wouldn't have chosen PHP for the first one, but there's no >>> reason it shouldn't work.  For the second one, did you mean to >>> write "serial port"?  That's a bit of a d

Re: [PHP] daemon without pcntl_fork

2009-08-20 Thread Jim Lucas
Lars Torben Wilson wrote: > 2009/8/19 Per Jessen : >> Jim Lucas wrote: > > [snip] > >> I probably wouldn't have chosen PHP for the first one, but there's no >> reason it shouldn't work. For the second one, did you mean to >> write "serial port"? That's a bit of a different animal, I'm not sure

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Lars Torben Wilson
2009/8/19 Per Jessen : > Jim Lucas wrote: [snip] > I probably wouldn't have chosen PHP for the first one, but there's no > reason it shouldn't work.  For the second one, did you mean to > write "serial port"?  That's a bit of a different animal, I'm not sure > how far you'll get with php. > >> He

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Per Jessen
Jim Lucas wrote: > Currently, I have two different uses for this startup script and > daemon/bg process. > > One will deal with a master server for one of my games and the second > will be for running a PBX SMDR/CDR capturing tool. > > The first must be able to deal with multiple simultaneous co

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Jim Lucas
Lars Torben Wilson wrote: 2009/8/18 Per Jessen : Jim Lucas wrote: Does anybody know how to use PHP as a daemon without the use of pcntl_fork. Sure. Just start it and leave it running. I want to launch a daemon out of the /etc/rc.local when the system starts. Yep, I do that all the time.

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Lars Torben Wilson
2009/8/18 Per Jessen : > Lars Torben Wilson wrote: > >> Again, that's not a daemon. If it is sufficient to run a background >> process then that's fine, but that doesn't make it a daemon (although >> it shares some things in common with a daemon). The background process >> still has a controlling t

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Per Jessen
Lars Torben Wilson wrote: > Again, that's not a daemon. If it is sufficient to run a background > process then that's fine, but that doesn't make it a daemon (although > it shares some things in common with a daemon). The background process > still has a controlling terminal (even if input and out

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Lars Torben Wilson
2009/8/18 Per Jessen : > Jim Lucas wrote: > >> Does anybody know how to use PHP as a daemon without the use of >> pcntl_fork. >> > > Sure. Just start it and leave it running. > >> I want to launch a daemon out of the /etc/rc.local when the system >> starts. > > Yep, I do that all the time. > >> Any

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Per Jessen
Jim Lucas wrote: > Does anybody know how to use PHP as a daemon without the use of > pcntl_fork. > Sure. Just start it and leave it running. > I want to launch a daemon out of the /etc/rc.local when the system > starts. Yep, I do that all the time. > Anybody have any idea on how to do this?

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Lars Torben Wilson
2009/8/17 Jim Lucas : > I want this to be a system that works out of the box.  For the most part. > > I am expecting to have phone system vendors and low-level IT personal trying > to install this thing. > > I don't want to have to field tons of questions on "How do I compile this > p&#*(_fork thin

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Jim Lucas
Lars Torben Wilson wrote: 2009/8/17 Jim Lucas : Does anybody know how to use PHP as a daemon without the use of pcntl_fork. http://php.net/pcntl_fork Hi Jim, AFAIK you can't. Read on. . . I don't want to have to have a person have a special/custom compilation of PHP just to run a simple da

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Lars Torben Wilson
2009/8/17 Jim Lucas : > Does anybody know how to use PHP as a daemon without the use of pcntl_fork. > > http://php.net/pcntl_fork Hi Jim, AFAIK you can't. Read on. . . > I don't want to have to have a person have a special/custom compilation > of PHP just to run a simple daemon. > > My system:  

Re: [PHP] Daemon starting

2002-04-22 Thread Danny Shepherd
Not played with them myself but you might want to take a look at the system() and shell_exec() functions. HTH Danny. - Original Message - From: "Gilles Nedostoupof" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 22, 2002 12:28 PM Subject: [PHP] Daemon starting > Hi al

[PHP] Re: PHP Daemon

2002-03-06 Thread Karl Pietri
Hey i think you might wanna look up the socket functions in php. you could use them to have one php script talk to another php script. even send the file over that connection (but it wont be secure unless you encode and then send in your php script). fsockopen() has some problems, but you may b

Re: [PHP] Daemon with a PHP file

2001-03-21 Thread Douglas Winslow
On Wed, 21 Mar 2001, Renzi, Sebastian wrote: > > Hello my name is Sebastian ,i'm from Argentina ,this is my first > question in this list.I would like to know how to run a php file every > day at 8 AM , my intention was to create a cron with the crontab > command.Something like this ... > > 0 8 *

Re: [PHP] Daemon with a PHP file

2001-03-21 Thread Phillip Bow
Unless you have the php executable associated with the .php3 extension(not the web server association mind you) then you would need to pass the file as a command line argument to the executable. 0 8 * * * "/usr/local/bin/php /home/users/sebas/citas.php3" Depending on the location of the php exec