Having Problem with SQL need help
Posted by shawnchin, 01-26-2011, 09:11 AM Hello World, Having Problem of (Warning: mysql_connect() [function.mysql-connect]: User printin6_chat already has more than 'max_user_connections' active connections in /home5/printin6/public_html/chat/site_conf/config.php on line 2 error) someone told me acutal problem in my config.php file $chat_conn = mysql_connect("localhost","printin6_chat","GL,<+u%=1w9I"); if(!$chat_conn) die( "error"); if(!mysql_select_db("printin6_chat", $chat_conn)) echo "DB error"; @session_start(); ?> here is code please tell me solution what i do to remove error.
Posted by hgfoo0000, 01-28-2011, 03:18 PM The error is not in that config.php file...the *line* causing that error to throw is in your config.php file. That error is saying that "on line 2 of config.php, you cause this error to happen"...and line 2 is where you try to connect. Hope that makes sense. As for your actual error, you need to check /etc/php.ini, or whatever path your php.ini resides in to increase the max_user_connections value.
Posted by care4server, 01-28-2011, 04:47 PM max_user_connections is in your my.cnf file.. try increasing the value in /etc/my.cnf
Posted by cvefa, 01-28-2011, 06:13 PM max_user_connections is your mysql server inside config file parameters if you are use linux etc/my.cnf file or you are using windows server my.ini file open and find max_user_connections and set new high value.
Posted by johnstevebravo, 02-12-2011, 01:21 PM It seems that you are executing the mysql_connect() function more than once. Always use require_once('config.php') so that the file config.php would not be included more than once.