Guest Posted April 5, 2007 Posted April 5, 2007 I'm trying to set up oscommerce on my desktop using the AppServer 2.4 package (Apache 2.0.59, PHP 4.4.4, MySQL 5.0.24a and phpMyAdmin 2.9.0.2). I get all the way through the install to the final page with the 'Catalog' and 'Admin' buttons. When I click the buttons I get 'Unable to connect to database server'. I have been stuck on it for hours! Any help would be greatly appreciated smile.gif Please please!
Bushmaster Posted April 5, 2007 Posted April 5, 2007 check your settings in catalog/includes/configure.php and in admin/includes/configure.php . At the bottom of each you need to fill in mysql server the user and the password for your database
Guest Posted April 6, 2007 Posted April 6, 2007 check your settings in catalog/includes/configure.php and in admin/includes/configure.php . At the bottom of each you need to fill in mysql server the user and the password for your database Have checked this and they are all correct as far as I can see. I get right through the end step fine, but when I click on the button to open either admin or catalog I get the error saying unable to connect. Cheers for the suggestion though. Any other clues? Is there a log somewhere I can check for what the error might be? This is the first time I've worked with oscommerce.
Bushmaster Posted April 6, 2007 Posted April 6, 2007 Have checked this and they are all correct as far as I can see. I get right through the end step fine, but when I click on the button to open either admin or catalog I get the error saying unable to connect. Cheers for the suggestion though. Any other clues? Is there a log somewhere I can check for what the error might be? This is the first time I've worked with oscommerce. Try to open your desk top installation with out using the buttons and see if that works. The buttons may still try to look on the internet for you site rather then local.
Guest Posted April 6, 2007 Posted April 6, 2007 Ahh, some thing is happening here. If I type http://localhost/oscommerce_store/catalog/index.php into my browser it is actually trying to connect to http://www.localhost.com/oscommerce_store/catalog/index.php instead. My catalog/includes/configure.php file is set up as below; <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 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://localhost'); // 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', 'localhost'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/oscommerce_store/catalog/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/oscommerce_store/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', 'C:/AppServ/www/oscommerce_store/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', 'abcdef'); define('DB_DATABASE', 'oscommerce_test'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> My admin/includes/configure.php is set up as below; <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 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://localhost'); // eg, http://localhost - should not be empty for productive servers define('HTTP_CATALOG_SERVER', 'http://localhost'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', 'C:/AppServ/www/oscommerce_store/catalog/'); // where the pages are located on the server define('DIR_WS_ADMIN', '/oscommerce_store/catalog/admin/'); // absolute path required define('DIR_FS_ADMIN', 'C:/AppServ/www/oscommerce_store/catalog/admin/'); // absolute pate required define('DIR_WS_CATALOG', '/oscommerce_store/catalog/'); // absolute path required define('DIR_FS_CATALOG', 'C:/AppServ/www/oscommerce_store/catalog/'); // absolute path required 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 our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', 'abcdef'); define('DB_DATABASE', 'oscommerce_test'); define('USE_PCONNECT', 'true'); // use persisstent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Sorry to be a bit slow but am still fairly new at this. Getting there but still getting stuck at the most simple things sometimes! Any help is greatly appreciated :)
Guest Posted April 6, 2007 Posted April 6, 2007 Turns out the redirection to http://www.localhost.com from http://localhost is a problem with php4. I've installed php5 and the problem has gone. Now all works perfectly. Thank you for your help! :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.