Few errors?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Few errors?

Postby jimlad » 16. November 2009 10:41

Hi there,

I have XAMMP v1.7.2 for Windows running on a Windows XP SP2 box ... Now typically, I've been running my php script from online webhosts, but want to try get it working locally.

When viewing the page, I am presented with the following errors:

Code: Select all
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\class.Mysql.php on line 18

Fatal error: Call to undefined function error() in C:\xampp\htdocs\class.Mysql.php on line 101


So, I have no user called ODBC what so ever ... here is the few lines from that file:

Code: Select all
      

17  global $config;
18  $this->rLink = mysql_connect( $config[ "host" ], $config[ "username" ], $config[ "password" ] );
19  if( !$this->rLink )
20  {
21  $this->triggerError( "Could not make connection with <i>" . $config[ "host" ] . "</i>." );


Now my db, user, and password is pulled from config.php which reads:

Code: Select all
<?

$config[ "username" ] = "xxx";
$config[ "password" ] = "xxx";
$config[ "host" ] = "localhost";
$config[ "database" ] = "xxxx";
?>



Any ideas?
jimlad
 
Posts: 3
Joined: 16. November 2009 10:10

Re: Few errors?

Postby Izzy » 16. November 2009 10:49

Did you create your database/user/password using phpMyAdmin?

See if there is any help in the Forum Search Results.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Few errors?

Postby Wiedmann » 16. November 2009 11:13

Code: Select all
Access denied for user 'ODBC'@'localhost'

Now my db, user, and password is pulled from config.php which reads:

Your script is not using this user "xxx" from this "config.php".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Few errors?

Postby jimlad » 16. November 2009 12:50

Is this because its using PHP4 and not 5?

The username/password combo is correct in phpMyAdmin, i aint that bad :lol:

Anyway around this?
jimlad
 
Posts: 3
Joined: 16. November 2009 10:10

Re: Few errors?

Postby Nobbie » 16. November 2009 13:22

Use <?php instead of <?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: Few errors?

Postby jimlad » 16. November 2009 13:59

Doesn't make a difference, thanks for the input though

Anyone else?
jimlad
 
Posts: 3
Joined: 16. November 2009 10:10

Re: Few errors?

Postby Altrea » 17. November 2009 09:14

- display all errors (inclusive Notices) if not done before
- Try to echo out (or better var_dump) your $config array after setting the array values and second time earlier then your db_connect on line 18.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 90 guests