Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to point to new DB


dannyb343

Recommended Posts

I have been attempting to set up a secondary store that is basically a duplicate of the first using a different database. This is being done to create a regional pricing scheme. Although I have set up the second catalog successfully, it reverts to the primary database instead of the regional one that I have set up.

 

What could be the cause?

 

Here are the pertinent areas of the two admin/includes/configure.php this is duplicated in the catalog/includes/configure.php as well:

// define our database connection
 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', '******');
 define('DB_SERVER_PASSWORD', '******');
 define('DB_DATABASE', 'shop');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');

 

// define our database connection
 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', '******');
 define('DB_SERVER_PASSWORD', '******');
 define('DB_DATABASE', 'shopeks');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');

 

As I said, the new catalog connects to the old DB just fine, in spite of the different definitions for DB_DATABASE.

 

Any help would be appreciated.

"Riding on the Horns of a Dilemma and steering with the Reign of Confusion"

Link to comment
Share on other sites

you also need to change the catalog pointer in your configure.php files.

 

 

Actually, I have, the original is at root/catalog and the new one is at root/new/catalog.

 

I specified these as https://mysite.com and https://mysite.com/new in the HTTPS_CATALOG_SERVER section of configure.php files of the respective stores. The catalog path was left as /catalog/ which is correct.

 

I tried it both ways using new/catalog/ instead of the method above. Currently it looks like this:

 

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', 'http://www.mainsite.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', 'http://mysite.com/new');
 define('HTTPS_CATALOG_SERVER', 'https://mysite.com/new');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');

 

Which seems to work fine except for the erroneous DB connection.

"Riding on the Horns of a Dilemma and steering with the Reign of Confusion"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...