#24302 [Bgs->Opn]: pcntl_fork causes DB insert/update to fail.

From: Date: Tue, 24 Jun 2003 16:01:57 +0000
Subject: #24302 [Bgs->Opn]: pcntl_fork causes DB insert/update to fail.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17671@lists.php.net to get a copy of this message
ID: 24302 User updated by: karl at karlaustin dot com Reported By: karl at karlaustin dot com -Status: Bogus +Status: Open Bug Type: PEAR related Operating System: RH7.3 PHP Version: 4.3.1 New Comment: I have tried creating a new connection (in the child) once the process has been forked, it will also not do an INSERT or UPDATE either, as the connection is created in the child, I would assume the parent should not close the connection? Yet it appears it does. Previous Comments: ------------------------------------------------------------------------ [2003-06-24 07:37:31] georg@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This doesn't work, cause the parent kills the connection automatically via zend_list_delete when it ends. ------------------------------------------------------------------------ [2003-06-23 16:01:34] karl at karlaustin dot com Description: ------------ When using pcntl_fork with PHP the child processes are unable to use a database connection that has been created via PEAR DB to a postgresql DB server to update/insert any rows. Reproduce code: --------------- http://www.karlaustin.com/php/pcntl-db.phps Expected result: ---------------- DB Should have updated values. It does not. Actual result: -------------- Error: [nativecode= server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24302&edit=1

« previous php.pear.dev (#17671) next »