Jump to content

Persistent Connection


edemars

Recommended Posts

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 here
The 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! :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 5 months later...
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???

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...