patator Posted August 14, 2006 Share Posted August 14, 2006 Hello I'm trying to duplicate my store to another directory, where I can test code the store, while the main store is still live. The main store is http://clubfitting.net.icodia.info/index.php The copy is in http://clubfitting.net.icodia.info/test_cl...tting/index.php I modified the configure files in test_clubfitting/includes to point to the correct place and database. I created another database for the duplicate store to write to (clubfitting2). The admin section is correctly pointing to the second database (clubfitting2). The catalog section points to the live database (clubfitting). Do you have any idea what could be wrong ? (cache...?) Here is a copy of my test file configure.php define('HTTP_SERVER', 'http://clubfitting.net.icodia.info'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'clubfitting.net.icodia.info'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/test_clubfitting'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/test_clubfitting/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_LANGUAGE', '/home/WwwBSD/clubfitting.net/test_clubfitting/includes/languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); // define('DIR_FS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/home/WwwBSD/clubfitting.net/test_clubfitting/'); define('DIR_FS_DOWNLOAD', '/home/WwwBSD/clubfitting.net/test_clubfitting/download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_LANGUAGE','/home/WwwBSD/clubfitting.net/test_clubfitting/includes/languages/'); // define our database connection define('DB_SERVER', '*******'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '**********'); define('DB_SERVER_PASSWORD', '*********'); define('DB_DATABASE', 'clubfitting2'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' Thanks for your help Patrice Link to comment Share on other sites More sharing options...
patator Posted August 14, 2006 Author Share Posted August 14, 2006 My shop is now back to live and I still have the same problem (test website products pointing to the live database and not test database) I noticed something very strange. If I go to http://www.clubfitting.net/test_clubfittin...products_id=466 , I notice that the breadcumb shows the category Midzise (refering to the database of my test shop). Catalogue ? Grips ? Midsize ? Winn ? Winn G8 AVS XF Noir/Bleu Midsize - Grip (57408) Look at the menu, the "midsize" category doesn't show. The "midsize" category category isn't created yet in the live website : http://www.clubfitting.net/product_info.php?products_id=466 In the admin section, I can correctly consult the products created in the test site. Could somebody help me in any way, I've been looking for a solution for hours... Copy of my new configure.php <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.clubfitting.net/'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.clubfitting.net/'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/test_clubfitting'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', 'test_clubfitting/'); define('DIR_WS_HTTPS_CATALOG', ''); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_LANGUAGE', '/home/WwwBSD/clubfitting.net/test_clubfitting/includes/languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); // define('DIR_FS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/home/WwwBSD/clubfitting.net/test_clubfitting/'); define('DIR_FS_DOWNLOAD', '/home/WwwBSD/clubfitting.net/test_clubfitting/download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_LANGUAGE','/home/WwwBSD/clubfitting.net/test_clubfitting/includes/languages/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '*****'); define('DB_SERVER_PASSWORD', '*********'); define('DB_DATABASE', 'club'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' ?> Link to comment Share on other sites More sharing options...
patator Posted August 15, 2006 Author Share Posted August 15, 2006 Sorry to knock again but does somebody have an idea ? thanks for your help patice :-" Link to comment Share on other sites More sharing options...
jhsands Posted August 15, 2006 Share Posted August 15, 2006 Make sure you have both configure.php pointing to the test database. YOu can simply copy the entire current database and then reuplad it as a renamed database. BACKUP your current files before editing. Did I mention to BACKUP your current files, first? "I'm not a hero, I'm a firefighter; it is my job to save lives. I'm a Jesus Christ Firefighter saving souls from the flames!" Installed contribs: Almost XP Buttons *** Attribute Sort *** Auto Thumbnail Change *** Column Product Listing (for SPPC v4.0) *** Contact Us Registered *** Country-State Selector 1.3.3J *** CC# Db Mask 1.3 *** Email Order Clickable Link *** Extra Images *** Linkpoint API CVM *** Loginbox Best *** New Spiders *** New Attrib Mgr v.5.0 w/ New Attrib Include *** Multi Product Update *** MySQL Cron *** Pricing per Category *** Product Listing in Columns v2.2 [later upgraded to CPL(SPPC)] *** Product Sort v1.6 *** Seperate Pricing Per Customer v4.15 *** Simple Down for Maintenance [Gokou] *** Ultimate_SEO_URLs_v2.2.2 *** UPS Worldship Export 1.3 *** Welcome Email username & password Link to comment Share on other sites More sharing options...
patator Posted August 15, 2006 Author Share Posted August 15, 2006 Thanks for your answer I tried to point the live store to the test database, changing the configure.php in admin and in catalog. The admin section points correctly to the test database but not the catalog side (apart from the breadcrumb). I deactivated the cache, turned off the url rewriting, empty the cache of my browser.... I really can't understand what's happening.... Patrice Make sure you have both configure.php pointing to the test database. YOu can simply copy the entire current database and then reuplad it as a renamed database. Link to comment Share on other sites More sharing options...
patator Posted August 15, 2006 Author Share Posted August 15, 2006 None of all solutions work.... Could it be related to my hosting company and not to a configuration problem ? Thanks for your help Patricewhostartstobedesperate Link to comment Share on other sites More sharing options...
patator Posted August 16, 2006 Author Share Posted August 16, 2006 I found a kind of solution to my problem but I don't like it. If I add the name of my test database 'club' to all table names in database_tables.php, then my test site is correctly accessing to the database test (otherwise it accesses to the db called clubfitting) Temporary solution is like : define('TABLE_PRODUCTS_DESCRIPTION', 'products_description') must be define('TABLE_PRODUCTS_DESCRIPTION', 'club.products_description') Can somebody tell me where Osccommerce makes the connection between what is in the configure.php -define('DB_DATABASE', 'club'); - and the name of the database used for each query ? Thanks for your help Patrice Link to comment Share on other sites More sharing options...
patator Posted August 16, 2006 Author Share Posted August 16, 2006 Another point: This product http://www.clubfitting.net/test_clubfittin...products_id=357 calls the table 'clubfitting' (as observed in the SQL error). in product_info, I added 'db_database:'.DB_DATABASE; and we can see before the error message that .DB_DATABASE = 'club' and not 'clubfitting' as indicated in the SQL message. I can not understand at all what's happening !!! Patrice :shock: Link to comment Share on other sites More sharing options...
patator Posted August 17, 2006 Author Share Posted August 17, 2006 Problem fixed: The problem was coming from the Robotstat contrib installed on my site. Connections to the db were hard coded and didn't use parameters indicated in configure.php. Each time the application top was calling this contrib, the db_name from configure.php was replaced by the one indicated in robotstat It might help somebody Patrice B) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.