php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7757 mysql_pconnect does not reuse old connection
Submitted: 2000-11-11 06:40 UTC Modified: 2000-11-11 21:52 UTC
From: mjrider at enschede dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.3pl1 OS: Redhat 6.2 kernel 2.2.16
Private report: No CVE-ID: None
 [2000-11-11 06:40 UTC] mjrider at enschede dot com
./configure' '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc/php' '--with-xml' '--with-mysql=/usr/local' '--with-zlib' '--enable-track-vars' '--enable-inline-optimization' '--with-gd' '--with-jpeg-dir=/usr/lib'

phpinfo() can be called from:
http://murphy.ict.hen.nl/phpinfo.php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-11 06:59 UTC] mjrider at enschede dot com
The bug only apears to affect mysql_pconnect() when i
supply a host, user  and pass combo

 [2000-11-11 21:52 UTC] ronabop@php.net
How are you testing that it is unused within the same PHP script? If you look at the manual pages on persistant connections, you will discover that a persistant database connection is not related to:
Subsequent page loads by the same user
Subsequent page loads by a different user
See:
http://www.php.net/manual/features.persistent-connections.php

It does not allow a user to re-use the same connection, or
for PHP to always use the same connection.

In short, this feature only has value when using many database connections within the same PHP page, or when your
PHP connections are all making different connections to the database, in a manner unrelated to the data or user, and need an additional speed boost.

If you find that they are not using the same connection within one html page, or your mysql connections are not being held open for another reason, please re-open this bug and add a sample script, or explain your methodology.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 28 19:00:01 2026 UTC