It is currently Thu Mar 28, 2024 11:38 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: PHP Script trouble!!
PostPosted: Thu Jun 05, 2008 11:00 am 
Noobie
Noobie

Joined: Thu Jun 05, 2008 10:49 am
Posts: 1
I'm using a PHP Fanlisting management script, (Flinx), but I have trouble with my config file...

Code:
// Information needed to connect to mySQL
$dbhost = "localhost"; // usually this is localhost but if it doesn't work, check with your hosting provider
$dbname = "name"; // the name of the database you want to use
$dbuser = "name"; // your mySQL username (must have access to the database above!)
$dbpass = ""; // your mySQL password

// Choose a password to access admin.php
$admin_password = "";

// Absolute path to the folder where buttons will be uploaded - remember the trailing slash!
$MOVE_TO_PATH = "codes/";

// The URL to the folder above - remember the trailing slash!
$base_url = "danielucha.cogia.net/fanlists/codes/";

// Choose the target of your links, ie. _blank for a new window, _self for the same window
$target = "_blank";

// The names of the tables you wish to create for the categories and links (doesn't need to be changed)
$table_cat = "fanlist_cat";
$table_link = "fanlist_link";

// If you want to change the look of script, open up the header.inc and footer.inc that are included in the zip file, and follow the instructions there.

$db = @mysql_connect("$dbhost","$dbuser","$dbpass");
mysql_select_db("$dbname") or die( "Unable to select database. Are you sure the information in config.php is correct?");

?>


When I try to use it, this is what happens:

Quote:
Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/danielucha.cogia.net/fanlists/config.php on line 30

Warning: mysql_select_db(): A link to the server could not be established in /home/www/danielucha.cogia.net/fanlists/config.php on line 30
Unable to select database. Are you sure the information in config.php is correct?


Am I writing something wrong? I'm totally clueless...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 05, 2008 12:18 pm 
Support Team Member

Joined: Wed Sep 19, 2007 8:17 am
Posts: 7
You have to correct the following details in this script:

dbhost = "localhost"; // usually this is localhost but if it doesn't work, check with your hosting provider
$dbname = "name"; // the name of the database you want to use
$dbuser = "name"; // your mySQL username (must have access to the database above!)
$dbpass = ""; // your mySQL password

// Choose a password to access admin.php
$admin_password = "";


All this information can be gathered from the MySQL Manager menu, from your control panel.

_________________
Best Regards
James


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
100WebSpace © 2011