IndianWebPortal.com

Something Different In Linux

Home » mysql » why mysql_pconnect is disabled on shared server

why mysql_pconnect is disabled on shared server

Posted by Rishikesh Vispute Categories: mysql

mysql_pconnect() will maintain a persistent connection to the database. Whenever your script calls the connect to database function, it first searches already existing connections to the database and if exists it will use the same connection to connect to the database, if not it will open a new connection to the database. ie. Connection is Persistent

where as mysql_connect() function will establish a new connection whenever a connection to database needed, and after executing the script, this function disconnects the connection. ie. connection is not a persistent one.

mysql_pconnect() function is used where your site has a Heavy Traffic and where as mysql_connect() function is used when there is moderate/less traffic to your site.


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...