[php-maint] Bug#431433: Should new_link default to true when using mysql?

William Thompson wt at electro-mechanical.com
Mon Jul 2 15:03:08 UTC 2007

Package: php-db
Version: 1.7.6-2
Severity: wishlist

I had a little problem when using DB to access a mysql server.  I'm using
2 different DSNs, but has the same user/pass/server.  One of those stays
open throughout the script's life, the other does not.  The following script
shows this problem:




echo "Open DB1\n";
echo "db1=";var_dump($db1->connection);
echo "Open DB2\n";
echo "db1=";var_dump($db1->connection);
echo "db2=";var_dump($db2->connection);
echo "Close DB2\n";
echo "db1=";var_dump($db1->connection);
echo "db2=";var_dump($db2->connection);


Open DB1
db1=resource(9) of type (mysql link)
Open DB2
db1=resource(9) of type (mysql link)
db2=resource(9) of type (mysql link)
Close DB2
db1=resource(9) of type (Unknown)

I expected that db1, after disconnecting from db2 would still be connected.
Using new_link=true fixes this problem, but should this have to be

Or should this be reassigned to php5-mysql since mysql_close closes the
entire connection (even if more than 1 open occured)

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.12 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages php-db depends on:
ii  php-pear                      5.1.2-1    PEAR - PHP Extension and Applicati

php-db recommends no packages.

-- no debconf information

More information about the pkg-php-maint mailing list