Magento Forum

   
moving between HTTP and HTTPS causing log out [RESOLVED]
 
dfrick
Jr. Member
 
Total Posts:  8
Joined:  2009-01-15
SF Bay Area
 

This issue appears when setting “Use Secure URLs in Frontend” to Yes.

Here is the flow to reproduce for me:

1. add a product to the shopping cart
2. click on “proceed to checkout”

Expected result: https checkout page
Actual result: empty shopping cart page

The issue definitely is tied somehow to switching between http and https. As long as I stay on one or the other I’m fine, but as soon as I switch, my cart is emptied.

If I turn off Use Secure URLs in Frontend, or if I force secure and unsecure base urls to be https everything works.

Any ideas? I wanted to roll the site live tonight, but this has to be fixed first.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dfrick
Jr. Member
 
Total Posts:  8
Joined:  2009-01-15
SF Bay Area
 

[RESOLVED]

I was able to find the solution by working with my hosting provider:

Add the following line to a .htaccess file in your home directory:
php_value suhosin.session.encrypt Off

As suhosin (a PHP security patch) uses the TCP port number as part of
the encryption scheme it applies to session values, changing the port
(like from http to https) changes the encryption key, and invalidates
the session.  Turning this off just causes suhosin to not encrypt
session data.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nubber
Jr. Member
 
Total Posts:  3
Joined:  2009-08-18
 

Yep, i had the same issue in Safari Only it seemed. Moving between different storefronts as http://subdomain.domain.com to https://www.domain.com, the server would randomly create new cookies in /var/session/

Thanks for the fix

 
Magento Community Magento Community
Magento Community
Magento Community
 
nubber
Jr. Member
 
Total Posts:  3
Joined:  2009-08-18
 

Yep, i had the same issue in Safari Only it seemed. Moving between different storefronts as http://subdomain.domain.com to https://www.domain.com, the server would randomly create new cookies in /var/session/

Thanks for the fix

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cubix Web Solutions
Guru
 
Avatar
Total Posts:  318
Joined:  2009-07-01
LondON, United Kingdom
 

Love you dfrick@gmail.com wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top