edemars Posted October 12, 2006 Posted October 12, 2006 I created a help desk ticket and got a response from TCH-Carl. He's given me a rundown of how persistent connections work and how TCH deals with open connections and such. He recommended I ask here on the forums for help. You are using persistent connection to the server and hece each time the script is invoked, it might create a new session. You need to remove the persistent connection option and make sure that all database sessions are killed after script execution. You can get more information about this from other members of the forum who are using such scripts. Just post your request hereThe program I use is Directory97 PRO which is a Links Directory script. Is anyone familiar with knowing how to change the persistent connection option to a regular one or whatever the term would be called for a non-persistent connection? I actually requested help on the forums for Directory97 PRO and this is the response I got from the creator: click here I do enjoy this script and would like to use it, so if anyone can help me resolve this issue, I'd be grateful. The error I get is Warning: mysql_pconnect() [function.mysql-pconnect]: User xxxxxxx_xxxxxxx has already more than 'max_user_connections' active connections in /home/xxxxxxx/public_html/directory/includes/config.php on line 14 User xxxxxxx_xxxxxxx has already more than 'max_user_connections' active connections Thanks! Quote
TCH-Andy Posted October 12, 2006 Posted October 12, 2006 I had a look several times, but can't get to the web site with the code (from your link - the site appears down, so obviously not hosted with us ) Without looking at the way that it's coded, I can't really suggest how to modify it I'm afraid. Hopefully the site will be reachable at some point. Quote
edemars Posted October 12, 2006 Author Posted October 12, 2006 Hi Andy! Are you trying to download the program itself? I just tried a few minutes ago and it worked. http://www.c97.net/dl/index.php?act=download&id=5 From the error, I know I need to change the config.php, but curiousity makes me wonder if I need to change more than just that. Quote
stevevan Posted October 12, 2006 Posted October 12, 2006 (edited) I can't get to it either from Florida. *edit...just came up...running very slow. Edited October 12, 2006 by stevevan Quote
TCH-Dick Posted October 12, 2006 Posted October 12, 2006 Locate the following in /public_html/directory/includes/config.php >// initialize database if (!$dbh=mysql_pconnect ($db_hostname, $db_username, $db_password)) { echo mysql_error (); exit; } mysql_select_db($db_name, $dbh); and change to >// initialize database if (!$dbh=mysql_connect ($db_hostname, $db_username, $db_password)) { echo mysql_error (); exit; } mysql_select_db($db_name, $dbh); The config file appears to be created by the script so whenever you update the script make sure you check config.php. Quote
edemars Posted October 13, 2006 Author Posted October 13, 2006 And he tells me to change servers, lol. Maybe I should tell him about TCH! Quote
daspyda Posted April 10, 2007 Posted April 10, 2007 Locate the following in /public_html/directory/includes/config.php >// initialize database if (!$dbh=mysql_pconnect ($db_hostname, $db_username, $db_password)) { echo mysql_error (); exit; } mysql_select_db($db_name, $dbh); and change to >// initialize database if (!$dbh=mysql_connect ($db_hostname, $db_username, $db_password)) { echo mysql_error (); exit; } mysql_select_db($db_name, $dbh); The config file appears to be created by the script so whenever you update the script make sure you check config.php. Is this the recommended fix for phpBB??? Quote
daspyda Posted April 10, 2007 Posted April 10, 2007 Also, is it possible to edit the php.ini to disable pconnect??? Thanks, Don Quote
click Posted April 10, 2007 Posted April 10, 2007 Try adding the following to .htaccess >php_flag mysql.allow_persistent off If we're allowed to override it, it should cause php to treat a call to mysql_pconnect() the same as mysql_connect(). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.