T_love Posted March 28, 2006 Posted March 28, 2006 I have no idea when this started but for some reason now all my pages have a Base href of the secure url. I'm on a Shared SSL so this means cookies are not registering and i'm stuck with session IDs on all pages. While trying to figure this out, I started printing out the value of $HTTPS and getenv('HTTPS') and they are both always set to 'on' even on the home page and product pages. Is there a setting somewhere that i messed with. Contributions installed: SEO URLs All_products Additional Images Product listing in Columns Having images be secure all the time because of the base href is not bothering me as much as the session ids appearing in the urls all the time. Thank you all for any help you can provide T
jasonabc Posted March 28, 2006 Posted March 28, 2006 you most likely have an incorrectly configured config file. Paste it here - minus the database name, username and password. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
T_love Posted March 28, 2006 Author Posted March 28, 2006 <?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://mysite.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://myhost.com/~mysite'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'mysite.com'); define('HTTPS_COOKIE_DOMAIN', 'myhost.com/~mysite'); define('HTTP_COOKIE_PATH', '/shop/'); define('HTTPS_COOKIE_PATH', '/shop/'); define('DIR_WS_HTTP_CATALOG', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); 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', '/home/mysite/public_html/shop'); 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', 'username'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'mysite_osc1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Thank you for the help
jasonabc Posted March 28, 2006 Posted March 28, 2006 Your config file looks fine. It must be a problem with one of your contributions - maybe the SEO URL one? This is where it sets the base href - the path is just lifted straight out of the config file (via application_top.php). Does yours look different to this? <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
T_love Posted March 28, 2006 Author Posted March 28, 2006 <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> yup, looks the same. Where does $HTTPS get set to 'on'? Basically, where does the request type get set to secure? i think that's where i might have a problem. Shouldn't the links also be secure?
user99999999 Posted March 28, 2006 Posted March 28, 2006 Maybe this applies to you. http://www.oscommerce.com/community/contributions,3289
T_love Posted March 29, 2006 Author Posted March 29, 2006 Maybe this applies to you. http://www.oscommerce.com/community/contributions,3289 Thanks. That solved one problem and created a new one. I used one of the suggested tests for 'HTTPS' and it works. i get the session ID on one page and the rest don't have it any more. NEW PROBLEM!!!! -> Add to card on category and product page results in 'Your Shopping Cart is empty!' If i go back to any of the non-secure pages, my items reappear in the basket. I'm completely lost again.
T_love Posted March 29, 2006 Author Posted March 29, 2006 Thanks. That solved one problem and created a new one. I used one of the suggested tests for 'HTTPS' and it works. i get the session ID on one page and the rest don't have it any more. NEW PROBLEM!!!! -> Add to card on category and product page results in 'Your Shopping Cart is empty!' If i go back to any of the non-secure pages, my items reappear in the basket. I'm completely lost again. Went back and added 'SSL' to the tep_href_link()s in Application_top for the cart action redirects and its all good. Thanks for the help Jason and user99999999
Recommended Posts
Archived
This topic is now archived and is closed to further replies.