Jump to content


Photo

can anyone help .....


  • Please log in to reply
3 replies to this topic

#1 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 24 April 2006 - 07:45 AM

guys i am trying to run this script but i am getting this mistake :

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\catalog\includes\functions\database.php on line 19
Unable to connect to database server!


please anyone , tell me what is wrong there pls ,

#2 jeremywesselman

jeremywesselman
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts
  • LocationIndependence, KY

Posted 24 April 2006 - 07:56 AM

Can you give us the code that you are using to connect?

Thx.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]

#3 the apprentice webmaster

the apprentice webmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 24 April 2006 - 07:59 AM

[!--quoteo(post=367885:date=Apr 24 2006, 03:56 AM:name=jeremywesselman)--][div class=\'quotetop\']QUOTE(jeremywesselman @ Apr 24 2006, 03:56 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Can you give us the code that you are using to connect?

Thx.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
[/quote]

here's the code
function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;

if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username , $password);
} else {
line 19--> $$link = mysql_connect($localhost, $lololo , $password);
}

if ($$link) mysql_select_db($database);

return $$link;
}

so help me guys thx

#4 Roberto

Roberto
  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationLondon, England

Posted 24 April 2006 - 08:32 AM

Have you defined DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD and DB_DATABASE?

You need to tell PHP where the database is and how to connect to it.

Rob

*************************************
Mad Mouse Media Web Design
t: (+34) 610 837 558
e: rob@madmousemedia.co.uk
w: www.madmousemedia.co.uk
w: www.madmouseart.com *************************************




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users