graphicsgirl Posted August 19, 2005 Posted August 19, 2005 My host has osCommerce installed which I turned on and set up. I also turned on their shared ssl. After setting up the database with all my products, I went to test it. I add products to the shopping cart and when I click on check out, it shows that my shopping cart is empty. My host says that the fix is to make sure that you start out in the secure site, with the full secure URL which is https://mysite.hostname.com/catalog/ . It starts out fine but as I move through the site, clicking various links, it moves me back to http://mysite.com/catalog/whateverpage.php. The problem is that then cookies are set at the unsecure site and the secure checkout doesn't find them. Can anyone give me specifics of how to make osCommerce stay on the secure site? :(
Guest Posted August 19, 2005 Posted August 19, 2005 in your configure.php put your https address in these fields: define('HTTP_SERVER', 'https://yourdomain.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://yourdomain.com''); // eg, https://localhost - should not be empty for productive servers define('HTTP_COOKIE_DOMAIN', 'https://yourdomain.com');
AlanR Posted August 20, 2005 Posted August 20, 2005 in your configure.php put your https address in these fields: define('HTTP_SERVER', 'https://yourdomain.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://yourdomain.com''); // eg, https://localhost - should not be empty for productive servers define('HTTP_COOKIE_DOMAIN', 'https://yourdomain.com'); <{POST_SNAPBACK}> That's actually bad info. And sure to cause problems. If you run the site that way search engines will never bother to index the site. Assuming osC is in catalog the configure.php file looks like this: define('HTTP_SERVER', 'http://mysite.com''); define('HTTPS_SERVER', 'https://mysite.hostname.com'); define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'mysite.com'); define('HTTPS_COOKIE_DOMAIN', 'mysite.hostname.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/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/'); Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
graphicsgirl Posted August 20, 2005 Author Posted August 20, 2005 That's actually bad info. And sure to cause problems. If you run the site that way search engines will never bother to index the site. Assuming osC is in catalog the configure.php file looks like this: define('HTTP_SERVER', 'http://mysite.com''); define('HTTPS_SERVER', 'https://mysite.hostname.com'); define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'mysite.com'); define('HTTPS_COOKIE_DOMAIN', 'mysite.hostname.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/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/'); <{POST_SNAPBACK}> Thanks. I've done this. Now I've also looked at admin/includes/configure.php. It has slightly different fields. Should I also be filling in the URLs there? I'm also not sure what to do about 'ENABLE SSL'. I have a shared SSL so do I make that 'true' or not? This is what the contents of that page look like right now. Can you advise me on what else I need to fill in?: define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', ''); define('HTTPS_CATALOG_SERVER', ''); 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/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); 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', ''); define('DB_SERVER_USERNAME', 'mysql'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', '');
♥Vger Posted August 20, 2005 Posted August 20, 2005 define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com'); define('HTTPS_CATALOG_SERVER', 'https://mysite.hostname.com'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'mysql'); // your mysql user name define('DB_SERVER_PASSWORD', 'your password'); // your mysql password define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); Vger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.