|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10841 Only last(?) of multiple mysql_pconnect() connections get reused
Submitted: 2001-05-13 18:50 UTC Modified: 2001-06-12 17:23 UTC
From: Thomas dot Lamy at netwake dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.4 OS: Linux 2.2.19
Private report: No CVE-ID: None
 [2001-05-13 18:50 UTC] Thomas dot Lamy at netwake dot de
After doing multiple (say 3) mysql_pconnect() from within
one page, as suspected the number of mysql threads
increases, but only the last connection made is being reused
by subsequent calls to mysql_pconnect from other pages/requests.
This is a bit unconfirmed, since I don't have the time and
resources right now, but tests on a production site (which
has crashed very often the last time) showed that the
following code cut down the number of mysql threads at least

if (!@mysql_select_db ("test")) {
  mysql_pconnect("db","user","pass") or die ("No
  mysql_select_db ("test") or die ("database does not exist:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-14 07:18 UTC]
Please try PHP 4.0.5


 [2001-05-14 07:54 UTC] Thomas dot Lamy at netwake dot de
Ok, hang on 'till weekend (production site update neccessary :-/)

 [2001-05-23 01:46 UTC]
Still waiting for the test results...

 [2001-06-12 17:23 UTC]
Reopen if this happens with PHP 4.0.6RC3:


PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Sep 25 17:01:26 2018 UTC