Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pointing to correct database


baalwww

Recommended Posts

I have a test store set up, and it's own database. Admin finds the database by looking in admin/includes/configure. But catalog is not looking at the same database, it is looking at the live database. I notice that catalog/includes/configure.php has no database info. Where does catalog get the name of the database to look at?

Link to comment
Share on other sites

I have a test store set up, and it's own database. Admin finds the database by looking in admin/includes/configure. But catalog is not looking at the same database, it is looking at the live database. I notice that catalog/includes/configure.php has no database info. Where does catalog get the name of the database to look at?

 

Both the admin and catalog side of OSC should be using the same database. The only database path info in OSC is in admin/includes/configure.php.

Link to comment
Share on other sites

Both the admin and catalog side of OSC should be using the same database. The only database path info in OSC is in admin/includes/configure.php.

 

ok, perhaps a dumb question, but could the test catalog be looking at the production admin instead of the test admin then and thus getting the wrong db name?

 

what is happening is that when i go to admin/products & cataegories, the categories are correct, and the products are there and in correct categories. when i go to online catalog, the categories that display are from the production database, and there are no products in any of them (which is the case in the production database, since I haven't loaded the products there yet).

 

I created the test store by copying the production setup to a subdomain, then editing the two configure files. Then I created a new database, and loaded it with the backup from the production one. I have since used easypopulate to load categories and products, and they show fine in the admin panel, but the catalog reflects the production categories.

Link to comment
Share on other sites

Found it. This is the second time I've been bitten by this. I'll learn someday.

 

It was that for some reason on my setup (osCommerce gets installed by a script with my hoster) I have a catalog/includes/local/configure.php as well ... it needed to be changed too. Sorry to waste your time.

Link to comment
Share on other sites

The only database path info in OSC is in admin/includes/configure.php.

 

WRONG. There are two, one in includes/ and one in admin/includes.

 

And, as Jeff found out, sometimes there are development versions in both local folders - but this shouldn't happen as the local folder shouldn't be uploaded to working sites.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...