smadadi Posted May 25, 2006 Posted May 25, 2006 Hello, We are having problems getting cookies to write on our site at latestdevelopments.net/catalog. The site is actually more of a catalog then a shopping cart for now so there is no checkout / shopping cart, just a wishlist. The problem is that when the user clicks the other areas of the site (at the top menu, news, etc.) they lose their session id as those pages are html pages and don't pass the oscid variable. I want to use a cookie to store the oscid variable, but it doesn't seem to be working at all and the cookie does not get written. Here is my configure.php define('HTTP_SERVER', 'http://www.latestdevelopments.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', '.latestdevelopments.net'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); 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/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/hsphere/local/home/ldinet/latestdevelopments.net/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', 'mysql.latestdevelopments.net '); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '**********'); define('DB_SERVER_PASSWORD', '*********'); define('DB_DATABASE', 'ldinet_osc2'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' Here is my sessions settings from the control panel: session directory: / force cookie use: false check ssl session id: false check user agent: false check ip address: false prevent spider sessions: true recreate session: false Does anyone see any issues with my configure.php file?
Guest Posted May 25, 2006 Posted May 25, 2006 these other areas of your site do they send the cookies? Becuase if they don't it could create this problem especially if the visitor goes straight to the static html pages without using the catalog. Why don't you deploy the oscommerce at the root of the domain? and/or use the osc code on these other areas.
smadadi Posted May 26, 2006 Author Posted May 26, 2006 Please assume that we do not have control over the rest of the site. Is there any issues you see with my configure.php that would cause the cookies to not work?
smadadi Posted May 26, 2006 Author Posted May 26, 2006 What would cause my cookies to not be written then?
VectorSix Posted May 26, 2006 Posted May 26, 2006 I would question this line: define('HTTP_COOKIE_DOMAIN', '.latestdevelopments.net'); What's the . before latestdevelopments.net do? Is it just latestdevelopments.net or or there supposed to be something before . ?
Guest Posted May 26, 2006 Posted May 26, 2006 I would question this line: define('HTTP_COOKIE_DOMAIN', '.latestdevelopments.net'); What's the . before latestdevelopments.net do? Is it just latestdevelopments.net or or there supposed to be something before . ? The . indicates the cookie to be used throughout the domain. Like if you have mysite.com www.mysite.com the cookie is the same. What would cause my cookies to not be written then? As long as the visitor stays on the catalog pages the cookie should work. Now I understand they don't so you could check few things if you have a different configure.php in use like in the locals directory or if you made changes in application_top or other scripts like those who build the links. If the cookie session is set there is no need to append the session.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.