Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I'm going nuts /


EricK

Recommended Posts

I moved a site and the admin area works fine, but the shop front-end won't connect to the db w/ the exact same db settings.

 

Installed it on 2 different servers, same results! Checked the configure file dozens of times, how is this possible?

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'db_username'@'localhost' (using password: YES) in /home/username/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

Regards,

Eric_K

Link to comment
Share on other sites

If you can connect to the admin,

 

Open your admin/includes/configure.php

 

And make sure your catalog/includes/configure.php matches it..

 define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'xxxx');
define('DB_SERVER_PASSWORD', 'xxxx');
define('DB_DATABASE', 'xxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

Thank you, I did that. The database connection is defined exactly the same in both configure.php files and still the shop won't connect.

 

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'db_username_here');
 define('DB_SERVER_PASSWORD', 'db_password_here');
 define('DB_DATABASE', 'db_name_here');
 define('USE_PCONNECT', 'false'); // use persisstent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

How is that possible?

 

Regards,

Eric_K

Link to comment
Share on other sites

On the catalog side do you have 2 configure.php files? 1 in includes/local/configure.php, and the other in includes/configure.php. If so the one in the local directory overides the other one.

Link to comment
Share on other sites

BINGO! That was it, thank you very much Brian you have partially restored my sanity! :D

 

Kindest warmest possible regards,

Eric_K

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...