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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
45 + 14 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 14:01:29 2024 UTC