Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot connect to database!!!


ysy

Recommended Posts

I've instaled oscommerce, created the database.

When i try to use it, the browser displays an error "cannot connect to database"

 

I apreciate your help!!

Link to comment
Share on other sites

Youv'e probably entered the path or name of the sql database wrong. It normally allways works :)

 

If checking the settings in:

admin/includes/configure.php

catalog/includes/configure.php

dosn't help, You'll have to be more specific:

 

Error occurs when entering admin, catalog or both?

List of your mysql setting from configure.php?

Your host suppliers data for your mysql database.?

Your OS (Win98, ME, 2000, Linux, Unix) if running localhost?

 

Hope this helps.

Best Regards

olby

Link to comment
Share on other sites

I've instaled oscommerce, created the database.

When i try to use it, the browser displays an error "cannot connect to database"

 

I apreciate your help!!

 

in catalog/includes/application_top.php you need to fill in this:

 

// define our database connection

define('DB_SERVER', 'localhost'); // this is typical config but not always

define('DB_SERVER_USERNAME', 'your_db_username');

define('DB_SERVER_PASSWORD', 'your_db_pass');

define('DB_DATABASE', 'catalog');

define('USE_PCONNECT', 1);

 

in admin/includes/application_top.php you need this:

// define our database connection

//define('DB_SERVER', $HTTP_ENV_VARS['HOSTNAME']);

define('DB_SERVER', 'localhost'); // use this instead of the line above

define('DB_SERVER_USERNAME', 'your_db_username');

define('DB_SERVER_PASSWORD', 'your_db_pass');

define('DB_DATABASE', 'catalog');

define('USE_PCONNECT', 1);

 

please note my comments after the lines of code snippets.

 

good luck.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...