php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11966 mysql_pconnect opens new connections with the same parameters
Submitted: 2001-07-09 05:32 UTC Modified: 2001-07-09 07:29 UTC
From: akul at otamedia dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: akul at otamedia dot com
New email:
PHP Version: OS:

 

 [2001-07-09 05:32 UTC] akul at otamedia dot com
each new mysql_pconnect opens new connection. About system: see http://www.crimaniak.com/info.php

 Code:

// defined constants: $DBServer, $DBUser, $DBPassword
include("base.inc.php");

// Open connection to server
if(!$base=mysql_pconnect($DBServer,$DBUser,$DBPassword))
		ErrExit("Error during connect to database:" . mysql_error());

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-09 07:29 UTC] derick@php.net
I;m not be able to reproduce this. But mysql_pconnect will make a connection for every httpd process that gets spawned.
One such httpd handles then like 100 requests, and there are mostly more than one of these child processes.
For every such child process, a new connection will be made, that is normal bahavior.

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 00:01:29 2025 UTC