PHP 4.0 Bug #6383: DB Persistent Connection not re-used
| From: | Howard dot Cohodas at dkt dot com | Date: | Sun, 27 Aug 2000 19:27:25 +0000 |
| Subject: | PHP 4.0 Bug #6383: DB Persistent Connection not re-used | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-30839@lists.php.net to get a copy of this message | ||
From: Howard.Cohodas@dkt.com
Operating system: NT4 SP6a
PHP version: 4.0 Latest CVS (27/08/2000)
PHP Bug Type: Other
Bug description: DB Persistent Connection not re-used
Configuration...
php-4.0.2-dev-Win32-24-8-2000.zip
WinNT4 SP6a
HTTP Server: WebSitePro/2.5.4
mySQL: 3.23.22-beta
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Refer to Bug id #5807. Seems similar. If so then might be OS relateded, not mySQL or PostgreSQL
related.
Script...
<html>
<head>
<title>DB Persistant Connection Test</title>
</head>
<body>
<?php
$db = mysql_pconnect ("localhost", "root")
or die ("Could not connect");
if (mysql_create_db ("myXdb")) {
print ("Database created successfully");
} else {
printf ("Error creating database: %s", mysql_error ());
}
print "<br>";
if (mysql_drop_db ("myXdb")) {
print "Database dropped successfully";
} else {
printf ("Error dropping database: %s", mysql_error ());
}
print "<br>";
mysql_close($db);
show_source(__FILE__);
phpinfo();
?>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Problem..
Running WinMySQLadmin, observing Processes.
Each time the script is run another process is added th the process list. The process goes into
Sleep mode.
Rather than re-using the idle persistent connection, another process is created.