gando Posted March 17, 2007 Posted March 17, 2007 Hi Im very new to creating a website and I had someone install all the php scripts for my new site but I keep getting an erroe saying hte following Warning: mysql_connect() [function.mysql-connect]: User findmera has already more than 'max_user_connections' active connections in /home/findmera/public_html/admincp/connect.php on line 0 I have asked my host to fix they said they did and I need to somehow make sure the script closes the connections instead of leaving them open How do I change the script to do this? Quote
TCH-Andy Posted March 17, 2007 Posted March 17, 2007 Hi Gando, Welcome to the forums. My first guess is that your script is using persistent connections look through the code, and see if there is a mysql_pconnect, if so change it to mysql_connect Quote
MikeJ Posted March 17, 2007 Posted March 17, 2007 Actually it looks like you are using non-persistent connections already, but apparently aren't closing them. For every mysql_connect(), you need a mysql_close() after you are done with the connection. (more specifically, mysql_close($sqlvariable), replacing $sqlvariable with the variable used to open the connection). Are these custom written scripts you are using, or a public package? If it's the latter, you may just need to find an update for the package. 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.