Questions tagged [mysql-pconnect]

The `mysql_pconnect` function opens a persistent connection to a MySQL server.

The mysql_pconnect function opens a persistent connection to a MySQL server. However, this function, along with all other mysql_* functions, are deprecated in PHP and should be avoided (see the red box). Consider using prepared statements with either PDO or MySQLi instead.

19 questions
0
votes
1 answer

Persistent DB Connections aren't Getting Reused

I am using phpgacl library in one of my applications for authorization. This library is making connections to the database using mysql_pconnect. The problem is that the connections aren't getting reused and at times the whole application crashes…
azi
  • 929
  • 1
  • 11
  • 31
0
votes
1 answer

persistent connections and wait timeout

Who maintains persistent connections pool? I've looked a bit at the source code and I understood that mysql_pconnect is a PHP made function and PHP itself is maintaining a pool of connections. It's not mysql's built in functionality and PHP only is…
Alex
  • 11,479
  • 6
  • 28
  • 50
0
votes
1 answer

Get many connection using mysql_pconnect()

I am using mysql_pconnect() for connecting to mysql. But when many users uses the website it gives the error "To many connection with mysql". For that i had set the variables max_connections=500 max_user_connections=1000 in my.cnf…
Sandip Karanjekar
  • 850
  • 1
  • 6
  • 23
-1
votes
1 answer

Pros and cons of using mysql_pconnect in php

I want to know that when I should use mysql_pconnect instead of mysql_connect.
justjiten
  • 1
  • 2
  • 2
1
2