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

From: Date: Mon, 30 Jun 2003 13:23:47 +0000
Subject: #24302 [Opn->Bgs]: pcntl_fork causes DB insert/update to fail.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17866@lists.php.net to get a copy of this message
ID: 24302 Updated by: cox@php.net Reported By: karl at karlaustin dot com -Status: Open +Status: Bogus Bug Type: PEAR related Operating System: RH7.3 PHP Version: 4.3.1 New Comment: This doesn't seem to be a PEAR DB problem. Please test your code with the native functions and reopen this bug if you still feel that it's a PEAR DB related issue. Previous Comments: ------------------------------------------------------------------------ [2003-06-24 11:01:56] karl at karlaustin dot com 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. ------------------------------------------------------------------------ [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 (#17866) next »