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

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

what error do you receive ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...