OSCommerce will not keep my sessions between HTTP and HTTPS.
If you are using assistive technology and are unable to read any part of the HostMonster website, or otherwise have difficulties using the HostMonster website, please call 866-573-HOST and our customer service team will assist you.
Skip to main content

HostMonster Web Hosting Help

OSCommerce will not keep my sessions between HTTP and HTTPS.

This is a problem with the cookie settings. These are easy to fix with a simple change in the includes/configure.php file. For this example, I will be using the https://secure.HostMonster.com/~username url.

Note: You may replace this url with any secure path you are currently using.

Edit the configure.php file located in the includes directory for your OSCommerce install. For this example it is:

  • ~/public_html/catalog/includes

I have 5 lines in the configure.php file which I am concerned with:

  • define('HTTP_SERVER', 'http://www.domain.com'); // eg, http://localhost - should not be empty for productive servers
  • define('HTTPS_SERVER', 'https://secure.HostMonster.com/~username'); // eg, https://localhost - should not be empty for productive servers
  • define('ENABLE_SSL', true); // secure webserver for checkout procedure?
  • define('HTTP_COOKIE_DOMAIN', 'www.domain.com');
  • define('HTTPS_COOKIE_DOMAIN', 'secure.HostMonster.com');

The third line defines that when you are dealing with checking out and account configuration, it uses a secure link. All other links will be unsecure. You want to make sure that the HTTP_SERVER and HTTPS_SERVER domain names are equal to the HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN setting as well. You will notice you do not include the "https" or the "~username" or any other folders at all, just the domain name.

With these settings, your viewers will have a seamless transition between secure and non-secure sites.

Knowledgebase Article 197,970 views bookmark tags: commerce cookie oscommerce ssl


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will show a way to protect specific pages of your website with SSL. This may have benefits for SEO and can be used on pages that contain forms, shopping carts or any other page where users might enter sensitive information.
Knowledgebase Article 121,066 views tags: htaccess pages specific ssl

An overview of what shopping carts are available and why you would want to use one.
Knowledgebase Article 115,999 views tags:

How to renew an existing SSL certificate--or purchase a new one, within your cPanel
Knowledgebase Article 332,270 views tags: cert certificate layer secure security socket ssl

Related Help Content

General Information about SSL Certificates
Knowledgebase Article 567,602 views tags: accept card cert certs credit ecommerce encryption layer online payments secure shopping socket

Where do I get a copy of the site seal for my SSL I purchased through HostMonster?
Knowledgebase Article 373,737 views tags: cert image logo seal secure ssl

I need to have an SSL Self-Signed Certificate installed for my domain.
Knowledgebase Article 292,574 views tags: secure ssl

Theme Plugin Wordpress Drupal Joomla Concrete5 Zen Cart Oscommerce Tomato Cart
Knowledgebase Article 189,683 views tags:

A guide on how to recover your OScommerce if you have lost your administrator password
Knowledgebase Article 95,375 views tags: oscommerce

How to force https on entire website.
Knowledgebase Article 378,792 views tags: htaccess ssl website

This article will explain how to change the Site URL or Home URL setting in WordPress. This may be useful if you have moved your WordPress site or are planning to move your WordPress site.
Knowledgebase Article 275,035 views tags: home site url wordpress wordpresstools

How do I use the free shared SSL Certificate?
Knowledgebase Article 945,003 views tags: activate certificate install path shared ssl

This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here