|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38283 mysql_pconnect can't reuse the connections
Submitted: 2006-08-01 14:39 UTC Modified: 2006-08-10 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: sanry at now dot net dot cn Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.1.4 OS: SUSE9.3 x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-08-01 14:39 UTC] sanry at now dot net dot cn
mysql_pconnect  create too many connections ,
not using the same connection in x86_64
(web server and mysql server not in the same computer)

I have test in 32bit system is okay,
both using the same mysql5.0.22

Reproduce code:
function getmicrotime(){
    list($usec, $sec) = explode(" ",microtime());
    return ((float)$usec + (float)$sec);
$t1=getmicrotime();//start time

$db=mysql_pconnect("", "test", "test");   
 if($db) echo $i.'connect successfully<br/>';
  echo mysql_stat($db).'<br/>';

}else $dbstatus=mysql_error();

echo "there are ".$dbstatus." connections ";
echo "time for connect is $tt ***";



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-02 10:13 UTC]
Can't reproduce with Apache2.0.55/worker and 5.2-CVS on Intel 64 server.
I get 1 persistent connection per Apache child/thread and this is the expected result.
 [2006-08-10 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 22:01:27 2024 UTC