Odd mysql_pconnect problem, with two PHPs on seperate ports
| From: | Sam Leibowitz | Date: | Thu, 15 Jun 2000 14:21:46 +0000 |
| Subject: | Odd mysql_pconnect problem, with two PHPs on seperate ports | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1935@lists.php.net to get a copy of this message | ||
Wanted to make sure I'm not missing anything obvious before submitting a
bug report:
I'm in the process of upgrading our web server's versions of Apache and
PHP (from 1.3.9 and 3.0.7 to 1.3.12 and 4.0.0, respectively). In order
to prevent nasty surprises, I've set up the new versions of both to run
on port 8000 while I test.
When run through PHP 3.0.7 (on port 80), the following code:
--------------
<?
// actual hostname, password, etc changed to protect the innocent
mysql_pconnect('host', 'user', 'pass');
$db = mysql_select_db('mydb');
print $db;
?>.
<?
$query = "SELECT count(session.*) FROM session WHERE available=\"Y\"";
$result = mysql_query($query,$db);
?>
--------------
...proudces pretty much the result you'd expect: "The connection ID is
1."
Try that on port 8000 (running PHP 4.0.0) and you get the following:
"The connection ID is 1. Warning: Supplied argument is not a valid
MySQL-Link resource in
/www/btc/live_site/htdocs/training/connecttest.phtml on line 11 ".
Am I missing something obvious, or should I be opening a bug report?
TIA,
Sam Leibowitz (sleibowitz@btcwcu.org)