[PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Ralf Gnädinger
Hi, i got some trouble with a PHP script using pcntl_fork do run some work in background. Runnig my script on my development system (PHP version 5.3.3-7) it behaves like intended. But running it on my production test system (PHP version PHP 5.1.2), i got some strange results. The problem is, that

Re: [PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Jim Lucas
On 03/29/2012 12:49 PM, Ralf Gnädinger wrote: Hi, i got some trouble with a PHP script using pcntl_fork do run some work in background. Runnig my script on my development system (PHP version 5.3.3-7) it behaves like intended. But running it on my production test system (PHP version PHP 5.1.2),

Re: [PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Stuart Dallas
On 29 Mar 2012, at 20:49, Ralf Gnädinger wrote: i got some trouble with a PHP script using pcntl_fork do run some work in background. Runnig my script on my development system (PHP version 5.3.3-7) it behaves like intended. But running it on my production test system (PHP version PHP

Re: [PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Ralf Gnädinger
development os is Debian GNU/Linux 6.0 test os is SUSE LINUX 10.1 (i586) Am 29. März 2012 23:02 schrieb Jim Lucas li...@cmsws.com: On 03/29/2012 12:49 PM, Ralf Gnädinger wrote: Hi, i got some trouble with a PHP script using pcntl_fork do run some work in background. Runnig my script on my

Re: [PHP] pcntl_fork behavior with php version 5.1.2

2012-03-29 Thread Ralf Gnädinger
I will try posix_setsid(). Both machines were accessed via a ssh client (e.g. putty or ssh from a other linux box). Thanks for your advice. Am 29. März 2012 23:08 schrieb Stuart Dallas stu...@3ft9.com: On 29 Mar 2012, at 20:49, Ralf Gnädinger wrote: i got some trouble with a PHP script

[PHP] pcntl_fork, catching STDOUT of child?

2012-01-19 Thread Thomas Johnson
Hello, PHP noob here. I've been working on writing a script (command-line) that forks a number of children to do various tasks. I've been using pcntl_waitpid inside a loop to wait for the children to exit, act on the results, and fork another copy of the child. Where I seem to be running into

Re: [PHP] pcntl_fork, catching STDOUT of child?

2012-01-19 Thread FeIn
Have a look at zeromq. http://vimeo.com/20605470 http://zguide.zeromq.org/php:all Hope it helps. On Fri, Jan 20, 2012 at 12:24 AM, Thomas Johnson t...@claimlynx.com wrote: Hello, PHP noob here. I've been working on writing a script (command-line) that forks a number of children to do

Re: [PHP] pcntl_fork?

2006-02-03 Thread Richard Lynch
On Mon, January 30, 2006 5:33 am, Peter Hoskin wrote: I have written a script to parse a large amount of XML data and insert it into SQL... deals with approx 80,000 rows each time I run it. I cannot successfully complete this script without running out of memory. Is pcntl_fork suitable to

[PHP] pcntl_fork?

2006-01-30 Thread Peter Hoskin
Hi, I have written a script to parse a large amount of XML data and insert it into SQL... deals with approx 80,000 rows each time I run it. I cannot successfully complete this script without running out of memory. Is pcntl_fork suitable to overcome this? I have been playing with pcntl_fork

Re: [PHP] pcntl_fork?

2006-01-30 Thread Jochem Maas
Peter Hoskin wrote: Hi, I have written a script to parse a large amount of XML data and insert it into SQL... deals with approx 80,000 rows each time I run it. I cannot successfully complete this script without running out of memory. how much memory do you have set as the max? do you have

Re: [PHP] pcntl_fork?

2006-01-30 Thread Peter Hoskin
Jochem Maas wrote: how much memory do you have set as the max? 512mb do you have control over this value? (i.e. is it not locked down by an admin) yes what are you doing with each row? (I imagine that effectively you From each row, I determine what XML files to fetch and parse... the

Re: [PHP] pcntl_fork?

2006-01-30 Thread Jochem Maas
Peter Hoskin wrote: Jochem Maas wrote: how much memory do you have set as the max? 512mb should be enough. :-) just to give it perspective I have a text file I import on at least a weekly basis (someone else does it actually but i wrote the code) that contains 500,000+ lines

Re: [PHP] pcntl_fork?

2006-01-30 Thread Peter Hoskin
Chris wrote: Hi Peter, If you can get it working can you send me a sample? Certainly... database connections must be CLEAN! Meaning, you should close them when they're no longer needed. Additionally, each fork should open its own DB connection. My completed code: ?

Re: [PHP] pcntl_fork?

2006-01-30 Thread Peter Hoskin
Sharing variables between processes and their forks needs something like shmop or systemv shared memory. Additionally, shared memory only lets you share basic variables and not database resources... or as far as I understand. So, each fork is required to create its own connection to the

Re: [PHP] pcntl_fork and reading from childs stdout

2005-06-13 Thread Tom Fishwick
Hi Richard, Thanks for the response. I'll try out the fifo. Tom [EMAIL PROTECTED] wrote: On Sun, June 12, 2005 12:57 pm, Tom Fishwick said: I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each

[PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Tom Fishwick
Hi All, I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... any ideas would be appreciated. (that don't involve using proc_open() :-) Tom

Re: [PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Richard Lynch
On Sun, June 12, 2005 12:57 pm, Tom Fishwick said: I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... This might help:

Re: [PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Marek Kilimajer
Tom Fishwick wrote: Hi All, I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... any ideas would be appreciated. (that don't involve using

Re: [PHP] pcntl_fork() hangs with FUTEX_WAIT

2005-02-17 Thread Steve
Well, but I don't use multithreading? PHP is running as CLI exec, not compiled into Apache... That's my configure command: ./configure --enable-pcntl --with-curl --with-mysql Or do I have to care for thread safety anyway? Regards, Steve Richard Lynch wrote: Steve wrote: I have a program which

Re: [PHP] pcntl_fork() hangs with FUTEX_WAIT

2005-02-17 Thread Richard Lynch
Steve wrote: Well, but I don't use multithreading? PHP is running as CLI exec, not compiled into Apache... That's my configure command: ./configure --enable-pcntl --with-curl --with-mysql Or do I have to care for thread safety anyway? For all I know (not much) --enable-pcntl may imply

[PHP] pcntl_fork() hangs with FUTEX_WAIT

2005-02-16 Thread Steve
I have a program which creates a lot of children over the time, which terminate themselves after they are finished. After some time however, the parent process hangs; apparently in pcntl_fork(). The child from this fork, however, seems to run normally. An strace on the parent shows

Re: [PHP] pcntl_fork() hangs with FUTEX_WAIT

2005-02-16 Thread Richard Lynch
Steve wrote: I have a program which creates a lot of children over the time, which terminate themselves after they are finished. After some time however, the parent process hangs; apparently in pcntl_fork(). The child from this fork, however, seems to run normally. An strace on the parent

[PHP] pcntl_fork doesn't work

2005-01-26 Thread John Davin
I'm trying to use pcntl_fork on php 4.3.10, but it says Call to undefined function: pcntl_fork() in test.php on line 3. The manual says pcntl is present in php = 4.1.0. I have 4.3.10, just the standard installation included on fedora core 3. I've done all the standard stuff - google'd,

Re: [PHP] pcntl_fork doesn't work

2005-01-26 Thread Richard Lynch
John Davin wrote: I'm trying to use pcntl_fork on php 4.3.10, but it says Call to undefined function: pcntl_fork() in test.php on line 3. The manual says pcntl is present in php = 4.1.0. I have 4.3.10, just the standard installation included on fedora core 3. I've done all the standard

[PHP] pcntl_fork and classes

2004-06-28 Thread josh
Is it possible to pcntl_fork() withing a class? Basically I want a web page to load, and when the class is called in the page, it can fork and the child can run, allowing the webpage to finish, but the class process can continue 'till it's done. Is this possible? Would I put the fork in the

Re: [PHP] pcntl_fork and classes

2004-06-28 Thread Justin Patrin
On Sun, 27 Jun 2004 15:31:59 -0500 (CDT), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is it possible to pcntl_fork() withing a class? Basically I want a web page to load, and when the class is called in the page, it can fork and the child can run, allowing the webpage to finish, but the

[PHP] pcntl_fork() under linux with phpcli

2003-09-18 Thread Daniel Souza
well... playing with fork() in a phpcli script, i got some troubles with childs... anybody knows how to dont get zombies/defuncts with SIGCHLD and SIGCLD ignoring ? dont worked for me =/ i dont want to know how many childs are running, or if they terminated or not... i want only to make childs

[PHP] pcntl_fork

2002-12-17 Thread Negrea Mihai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Does php 4.2.3 support pcntl_fork from the php compiles as module in apac= he? I have configured php with --enable-pcntl and it says: Call to undefined function: pcntl_fork() Thanks, - -- Negrea Mihai http://www.negrea.net -BEGIN PGP

Re: [PHP] pcntl_fork

2002-12-17 Thread Chris Hewitt
Negrea Mihai wrote: I have configured php with --enable-pcntl and it says: Either php being used is not compiled with this option (what does phpinfo show? Did you restart Apache)? Call to undefined function: pcntl_fork() Or pcntl_fork() is not a function provided with --enable_pcntl. I

Re: [PHP] pcntl_fork

2002-12-17 Thread Negrea Mihai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My phpinfo shows in the upper part in the configure line that it has been compiled with --enable-pcntl I have Apache 2.0 from RH8.0 And.. it works from the command line if I use the php binary On Tuesday 17 December 2002 17:33, Chris Hewitt wrote:

Re: [PHP] pcntl_fork

2002-12-17 Thread Negrea Mihai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 forgot to say: I have php 4.2.3 On Tuesday 17 December 2002 17:28, Negrea Mihai wrote: My phpinfo shows in the upper part in the configure line that it has been compiled with --enable-pcntl I have Apache 2.0 from RH8.0 And.. it works from the

Re: [PHP] pcntl_fork

2002-12-17 Thread Chris Hewitt
Negrea Mihai wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My phpinfo shows in the upper part in the configure line that it has been compiled with --enable-pcntl I have Apache 2.0 from RH8.0 This seemed a bit wierd so I looked further. From the manual

[PHP] pcntl_fork()

2001-07-19 Thread Richard Heyes
Using this function, say I had two processes running, the parent accepting connections on an inet socket, is it possible for the parent to pass this socket connection onto the already existing child? -- Richard Heyes I know not with what weapons World War III will be fought, but World War IV