Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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);
?>

Posted

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.

Posted

this =======> db_host = 'johnny.heliohost.org'; <==

 

should be ==> db_host = 'localhost'; <==

 

as a start

  • 2 weeks later...
Posted

Try typing the database name and password again. I have often found the error is a simple mis-spelling I overlooked.

Posted

With the PHP script I posted above at 10 February 2012 - 06:10 PM

what error do you receive ?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...