photoart Posted October 1, 2009 Posted October 1, 2009 Hi We need to be able to run a test version of our live site on a local host so modifications can be run without affecting the live site. The live site has been downloaded and can acces the index/home page locally, but all the links take us directly back to the live site. We are using XAMPP and have asked on their forums where we are going wrong bu the answer back is that XAMPP is working fine and it's down to our coding (our site developers actually but we are not going there :angry: ) We realise that we have a lot to learn on the coding front, but having had our fingers and pockets badly burnt, this is our only option. Any help or direction to where we can find some help on which code to change will be gratefully received. Thanks
multimixer Posted October 1, 2009 Posted October 1, 2009 You need to check 1) Your both configure.php files if all paths are correct 2) Your .htaccess file for possible paths in there My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Xpajun Posted October 1, 2009 Posted October 1, 2009 For a standard XAMPP set-up (Mac version) your configure files should look something as follows: root>>includes: <?php define('HTTP_SERVER', 'http://localhost'); define('HTTPS_SERVER', 'http://localhost'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); 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_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/Applications/xampp/xamppfiles/htdocs/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'store'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> root>>admin>>includes: <?php define('HTTP_SERVER', 'http://localhost'); define('HTTP_CATALOG_SERVER', 'http://localhost'); define('HTTPS_CATALOG_SERVER', 'http://localhost'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/Applications/xampp/xamppfiles/htdocs/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/Applications/xampp/xamppfiles/htdocs/admin/'); define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', '/Applications/xampp/xamppfiles/htdocs/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'store'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> If you are not running it on a Mac then /Applications/xampp/xamppfiles/htdocs/ will have to be changed to suit My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
pretzi Posted October 1, 2009 Posted October 1, 2009 Hi We need to be able to run a test version of our live site on a local host so modifications can be run without affecting the live site. The live site has been downloaded and can acces the index/home page locally, but all the links take us directly back to the live site. We are using XAMPP and have asked on their forums where we are going wrong bu the answer back is that XAMPP is working fine and it's down to our coding (our site developers actually but we are not going there :angry: ) We realise that we have a lot to learn on the coding front, but having had our fingers and pockets badly burnt, this is our only option. Any help or direction to where we can find some help on which code to change will be gratefully received. Thanks configure.php - check/change paths to point to the local site
photoart Posted October 1, 2009 Author Posted October 1, 2009 Xpajun, thanks for the coding advice on changing the configure.php files. I now get this message when I go to localhost/ 1046 - No database selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] There appears to be a database.php file and the code already has the chages as in the alert, there are DB backups in the backups folder. I have the site in the sites folder on a mac so I added the 'home" tag as well to the local host in the code. example: http://localhost/~boblaw/htdocs/catalog/index.php/ Do I need to download a new backup from the Database through the Admin control centre? Sorry to be thick on this, it is an extremely steep learning curve for me. Cheers
Xpajun Posted October 1, 2009 Posted October 1, 2009 you ned to put a copy of your live shop database into your localhost database: Access your on-line database from phpMyAdmin Click on your store's database select Export go to bottom of page select zipped or gzipped then click Go Now access your localhost database (xampp phpMyAdmin) create new database now select Import Browse your computer for the database backup you've just downloaded from your live store Click Go you will now get an exact copy of your on-line database in your test store In your configure files make sure that define('DB_DATABASE', 'store'); this name (in bold) is the same as your database name My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
photoart Posted October 1, 2009 Author Posted October 1, 2009 Xpajun. Thanks for the info... On importing the database in PHPAdmin I keep getting wrong syntax error messages coming up. I downloaded the DB file via the control panel| Database back up manager of the OSCommerce as I could not see how to access the live DB from PHPAdmin. Obviously I am doing something extremely thick here, excactly the reason why I need to run a test site!! Probably will not have time to do any more until the weekend now as am now very behind with the rest of work. Thanks a lot for your time. Cheers Rob
Xpajun Posted October 1, 2009 Posted October 1, 2009 Possibly because the osC backup is worded differently to how the database expects it - that is the database is looking for a non existent table to drop (first line of each table query) In phpMyAdmin in the lefthand column you will see a list of databases - just click on the one/name that corresponds with your store My store is currently running Phoenix 1.0.3.0 I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 ) I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary
diy Posted October 1, 2009 Posted October 1, 2009 Supposing that the db name is correct ( define('DB_DATABASE', 'store');store in this case), Start Xammp and if you still have the message checK the php and apache versions of xamp
photoart Posted October 11, 2009 Author Posted October 11, 2009 Possibly because the osC backup is worded differently to how the database expects it - that is the database is looking for a non existent table to drop (first line of each table query) In phpMyAdmin in the lefthand column you will see a list of databases - just click on the one/name that corresponds with your store Must apologise for not replying to all of the help posted; I've been very busy elsewhere. I've managed to rectify the errors on the DB and also a deprecation message that I was getting. However the home page now shows no images just question marks where they should be, the formatting is all awry and a section that is coded to be just for SEO by the sites original coders now appears as the header in very large text. Also all the links now go to http://localhost/xampp/ . The root folder is htdocs/catalog but there is a configure.php file that sits in the htdocs/includes folder that appears to be a copy of htdocs/catalog/includes/configure.php I don't know whether this has any relevance. Any suggestions gratefully received. Bob.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.