1
seolio
Porting Hot or Not script
  • 2006/7/11 11:05

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Hi All,
I am going to try and port a script into xoops, I know this is going to sound rediculous, but for starters I can not get this script to work without xoops, it will not connect with the database even though the correct inputs are there, I have messed around for ages and can not get it working, this is the config file:
$dbServer "localhost";
$dbuserName "username";
$dbpassword "password";
$dbName  ="database";
$site_title "Rate My Site";
$site_copyright "Rate My Site";
$bannerprice ="0.50";
$newletterprice ="0.76";
$paypalemail ="";
$stormpayemail "";
$passwordemail "email@domain.com"// This email is the address that the password retrievel will come from

///////////////////// DO NOY EDIT BELOW /////////////////////////////////////////
$con=mysql_connect ($dbServer$dbuserName$dbpassword) or die ('Cannot connect to the database.');
$db=mysql_select_db ($dbName);
session_start();
?>

Obviously, username/password etc.. have been removed/changed
The error message I am getting is this:

Quote:
Warning: mysql_connect(): Access denied for user 'username'@'localhost' (using password: YES) in /usr/home/mercedes/domains/domain.net/public_html/rate/config.php on line 15
Cannot connect to the database.


I know this is not a XOOPS module but can anyone help me with this, once this is sorted I can begin to have a go at porting it. I can't see any problems within the script, all of the database settings are correct aswell?????

Please help, somebody who knows a lot about php/mysql

Thanks in advance

Nick

2
Bassman
Re: Porting Hot or Not script
  • 2006/7/11 12:00

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


I know you said all the database settings are correct, but are they? Did you create a database called "database" and add user "username" with password "password" as a user?

in most cases if you create a database with CPanel, the actual database name will be something like "mercedes_database" and the username will be "mercedes_username"

3
seolio
Re: Porting Hot or Not script
  • 2006/7/11 12:24

  • seolio

  • Not too shy to talk

  • Posts: 196

  • Since: 2005/11/2


Cheers for the reply mate.

I definitely made sure the settings were correct, I am using DirectAdmin, when you add a database it tells you the settings for the script etc...
Will keep trying, can you think of anything else, so you think the script above is fine too?

Thanks

Nick

Login

Who's Online

339 user(s) are online (244 user(s) are browsing Support Forums)


Members: 0


Guests: 339


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits