|
|
|
|
![]() ![]() |
Jan 24 2006, 11:47 PM
Post
#1
|
|
|
Advanced Member Group: Members Posts: 113 Joined: 14-January 06 Member No.: 10,680 |
Well I've installed this same premodded phpbb before many times on many other servers, and it works fine. I know it wasn't the phpbb premodded board itself because of this; however, I keep getting this error whenever I try to install it on this server:
CODE Warning: mysql_connect(): Host 'gamma.xisto.com' is not allowed to connect to this MySQL server in /home/vicious/public_html/metabbv4/db/mysql4.php on line 48 Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/vicious/public_html/metabbv4/db/mysql4.php on line 330 Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/vicious/public_html/metabbv4/db/mysql4.php on line 331 phpBB : Critical Error Could not connect to the database I better not get mobbed by some dumb "use the search button" group for this, ebcause I did search it and there was only one other case like this and noone helped him. Can somone tell me what to do? |
|
|
|
Jan 25 2006, 12:51 AM
Post
#2
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
OK I won't tell you to search Vicious_AD but from the error that I see you are simply not connecting to the database. You will need to check your config .php file in the root directory. The file will look similar to below;
CODE // phpBB 2.x auto-generated config file // Do not change anything in this file! $dbms = 'mysql'; // This is correct for astahost $dbhost = 'localhost'; // This is correct for astahost $dbname = 'vicious'; // Make this correct on astahost is is usually your username $dbuser = 'xxxxx'; // This needs to be the same password as the cPanel $dbpasswd = ''; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); ?> You can go to the cPanel then to file manager and you will see that file (config.php) in your root or whichever subfolder you put the phpBB files into possibly metabbv4 the problem starts in the db folder which is basically trying to connect to the database server and here is the code that starts the error. CODE function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) The other two lines are just the lines that tell you about the error. So go to the file manager and find the config.php file in the metabbv4 folder and there is an option to edit it, just fill in the proper values for the user and password then try it again and you should be good to go.{ $this->persistency = $persistency; $this->user = $sqluser; $this->password = $sqlpassword; $this->server = $sqlserver; $this->dbname = $database; $this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password); |
|
|
|
Jan 25 2006, 01:12 AM
Post
#3
|
|
|
Advanced Member Group: Members Posts: 113 Joined: 14-January 06 Member No.: 10,680 |
QUOTE(Houdini @ Jan 25 2006, 12:51 AM) OK I won't tell you to search Vicious_AD but from the error that I see you are simply not connecting to the database. You will need to check your config .php file in the root directory. The file will look similar to below; CODE // phpBB 2.x auto-generated config file // Do not change anything in this file! $dbms = 'mysql'; // This is correct for astahost $dbhost = 'localhost'; // This is correct for astahost $dbname = 'vicious'; // Make this correct on astahost is is usually your username $dbuser = 'xxxxx'; // This needs to be the same password as the cPanel $dbpasswd = ''; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); ?> You can go to the cPanel then to file manager and you will see that file (config.php) in your root or whichever subfolder you put the phpBB files into possibly metabbv4 the problem starts in the db folder which is basically trying to connect to the database server and here is the code that starts the error. CODE function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true) The other two lines are just the lines that tell you about the error. So go to the file manager and find the config.php file in the metabbv4 folder and there is an option to edit it, just fill in the proper values for the user and password then try it again and you should be good to go.{ $this->persistency = $persistency; $this->user = $sqluser; $this->password = $sqlpassword; $this->server = $sqlserver; $this->dbname = $database; $this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password); Thank you, but I'm a little confused by what you mean by "proper values". Supposing my database is Vicious_forge, my user name vicious, and my password ***, how would I put that into the coding? I know little about php, so what's the proper way to do that? |
|
|
|
Jan 25 2006, 01:14 AM
Post
#4
|
|
|
Advanced Member Group: Members Posts: 113 Joined: 14-January 06 Member No.: 10,680 |
oh, and when I open up the config file for editing with the file manager like you said, then the little text area is completely empty. I'm guessing it shouldn't be this way?
|
|
|
|
Jan 25 2006, 01:54 AM
Post
#5
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
That is your problem if that file is empty there is no way that you can connect to the database. Basically the config.php file is run every time you start your web file or make any change or have any occassion to connect to the database. So the config file must be there.
Copy and paste this into the config.php in the cPanel when you have the proper values in there. Here is the code excep[t for the password you nedd to correct that part the rest should work just fine. CODE <?php Now Copy and paste that into the config.php file and save it then go to the home page of your site. You will probably have to set up your Admin and all that but this will get you going.// phpBB 2.x auto-generated config file // Do not change anything in this file! $dbms = 'mysql'; $dbhost = 'localhost'; $dbname = 'Vicious_forge'; $dbuser = 'vicious'; $dbpasswd = "takeThisOutAndPutYourPasswordHere"; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); ?> |
|
|
|
Jan 25 2006, 02:12 AM
Post
#6
|
|
|
Advanced Member Group: Members Posts: 113 Joined: 14-January 06 Member No.: 10,680 |
woot! fixxed. Thanks. The problem was that I put in he wrong thing under the database when installing. I changed it from "localhost" to "astahost.com" because my last server required that. Thanks buddy =D
|
|
|
|
Feb 13 2006, 02:47 AM
Post
#7
|
|
|
Super Member Group: Members Posts: 572 Joined: 25-April 05 From: Nashville Tennessee Member No.: 4,340 |
It's better not to use these premodded scripts. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 22nd November 2008 - 11:42 PM |