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

[PHP] daemon

2010-10-06 Thread Tommy Pham
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? Thanks, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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:  

[PHP] daemon without pcntl_fork

2009-08-17 Thread Jim Lucas
Does anybody know how to use PHP as a daemon without the use of pcntl_fork. http://php.net/pcntl_fork 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: OpenBSD 4.5 w/PHP v5.2.8 I want to launch a daemon out of the /etc/rc.loc

[PHP] php daemon

2003-11-23 Thread Jon Hill
I have just been trying to work out the behaviour of running a php programm from BASH. If i execute ./my_program.php >> /var/log/mylog 2>&1 & and then terminate the controlling terminal I get a background process which has no controlling terminal, a parent process id of 1 and the process becomes a

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]

[PHP] Daemon starting

2002-04-22 Thread Gilles Nedostoupof
Hi all, I'm looking for a simple method to start a linux daemon from a php script... I've already tried to use sudo by giving rights to apache user to execute some scripts from /etc/rc.d/init.d ; I do a exec ("sudo /etc/rc.d/init.d/daemon start"); Sometimes the daemon startup, sometimes no... I

[PHP] Re: PHP Daemon

2002-03-06 Thread Karl Pietri
es are running: > > server1 (win2000), not allowed to use a web-server on it, only port 22(ssh) > is open to internet > server2 (unix) has apache and php, only port 22 and 80 are open to internet > > I have to write a php-daemon on server1, which should simulate a > database-tri

[PHP] PHP Daemon

2002-03-06 Thread Ergin Aytac
Following boxes are running: server1 (win2000), not allowed to use a web-server on it, only port 22(ssh) is open to internet server2 (unix) has apache and php, only port 22 and 80 are open to internet I have to write a php-daemon on server1, which should simulate a database-trigger. Every 5 min

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

[PHP] Daemon with a PHP file

2001-03-21 Thread Renzi, Sebastian
> 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 * * * /home/users/sebas/citas.php3 > > but this