I stopped using pconnect. Don't see the sense in it. Why take the chance?

http://www.php.net/manual/en/function.mysql-pconnect.php

<blockquote>Warning
Using persistent connections can require a bit of tuning of your
Apache and MySQL configurations to ensure that you do not exceed
the number of connections allowed by MySQL.</blockquote>

Search also for "consistency" and read that note.

Begin using:
http://www.php.net/manual/en/function.mysql-connect.php

I had real trouble with this on a Windows server once. I stopped using pconnect. Too 
many connections. Crashed my server more than once.

# $link = mysql_pconnect($MyHost,$MyAccount,$MyPass);
$link = mysql_connect($MyHost,$MyAccount,$MyPass);
...
 mysql_close($link);

> Should we be using persistent connections, or are we better off opening and closing 
> connections on each query?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to