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
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),
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
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
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
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
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
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
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
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
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
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
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:
?
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
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
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
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:
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
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
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
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
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
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,
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
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
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
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
-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
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
-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:
-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
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
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
33 matches
Mail list logo