RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
Glad to help. I was actually interested in your post because of forking versus threading. I still haven't found anything except for PHP-GTK but it may help your database related performance if it is added/exists in PHP. Regards, Dwight > -Original Message- > From: Chris Verges [mailto:[EM

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
For anyone interested in following the progress of this forking/PEAR::DB issue, see http://pear.php.net/bugs/bug.php?id=10813. Thanks, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
Hey Dwight, After getting your first e-mail, I started adding the PEAR::DB persistent connection code. Unfortunately, it yielded the same results that I was getting before. At a hunch, I created a second proof-of-concept script that uses the mysql_* functions in the PHP base. For each of these,

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
To use a PEAR::DB persistent connection, try $db = DB::connect($dsn, TRUE); or $db = DB::connect($dsn, true); Googled for "pear::db persistent connection" and got http://vulcanonet.com/soft/?pack=pear_tut Regards, Dwight > -Original Message- > From: Dwight Altman [mailto:[EMAIL PROTECTE

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
EMAIL PROTECTED] > Sent: Monday, April 23, 2007 12:01 PM > To: Dwight Altman; php-db@lists.php.net > Subject: Re: [PHP-DB] Forking and database connections > > Hey Dwight, > > Thanks for the replies! When the first child thread closes, all of the DB > connections seem to cl

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
;execute, then after your foreach loop, get your > $db and execute. > > Regards, > Dwight > >> -Original Message- >> From: Dwight Altman [mailto:[EMAIL PROTECTED] >> Sent: Monday, April 23, 2007 10:09 AM >> To: 'php-db@lists.php.net'

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
, 2007 10:09 AM > To: 'php-db@lists.php.net' > Subject: RE: [PHP-DB] Forking and database connections > > http://php.he.net/manual/en/function.pcntl-fork.php says 'The reason for > the MySQL "Lost Connection during query"...' like what you concluded, &

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
http://php.he.net/manual/en/function.pcntl-fork.php says 'The reason for the MySQL "Lost Connection during query"...' like what you concluded, although they grab a new $db connection in the first for loop "} else if ( $pid ) {" I bet a child closes the one you create after the for loop while the pa