BobCat Posted February 6, 2012 Posted February 6, 2012 Using Phpfanlist, version 3.0. Followed instructions exactly as they wrote. This appears to be something incorrect. I've tried to set up a fanlisting, and when I run the fanlisting script I get the error: Could not select the database you specified. I'm using localhost in the config.inc.php file. I even tried using johnny.heliohost.org, got the same error. And the database is correct.
Ice IT Support Posted February 6, 2012 Posted February 6, 2012 Could you post the part of config.inc.php you are using for your database, removing passwords, etc.?
bdistler Posted February 11, 2012 Posted February 11, 2012 from http://wiki.helionet...MySQL_Databases enter your "USERNAME" and "PASSWORD" and "DATABASENAME" <?php print "try to open datatbase<br>\n"; mysql_connect("localhost", "USERNAME", "PASSWORD") or die(mysql_error()); mysql_select_db("DATABASENAME") or die(mysql_error()); print "got into dabase<br>\n"; print "the end<br>\n"; ?> works for me on server Stevie
Ice IT Support Posted February 12, 2012 Posted February 12, 2012 Here is the script I use to access my databases: <?php $dbcon = mysql_connect("localhost","username","password"); if (!$dbcon) { die("Error: " . mysql_error(); } mysql_select_db("database_name", $dbcon); ?>
BobCat Posted February 16, 2012 Author Posted February 16, 2012 OK, but first I have to reinstall the script, what is wrong with the config.inc.php file I had? It won't connect to the database despite everything set up correctly.
bdistler Posted February 17, 2012 Posted February 17, 2012 this =======> db_host = 'johnny.heliohost.org'; <== should be ==> db_host = 'localhost'; <== as a start
BobCat Posted February 26, 2012 Author Posted February 26, 2012 localhost still gives me the same problem. What else is wrong?
Ice IT Support Posted March 2, 2012 Posted March 2, 2012 Try typing the database name and password again. I have often found the error is a simple mis-spelling I overlooked.
bdistler Posted March 2, 2012 Posted March 2, 2012 With the PHP script I posted above at 10 February 2012 - 06:10 PMwhat error do you receive ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now