poudenes
By:
poudenes

Sessions problem

March 20, 2013 2.7k views
Hello, Can someone give me some support? Have transferred my website, import database... website is working very well.. Only issue i have and i can't find why... sessions is not working. When i want add something into the cart and want see my cart it says it is empty. So the session is not working correct.. try check the sessions settings in php.ini and match them with my old hosting did not work. Can you maybe take a look and do not solve it , but give me the steps i need to do so i learn from it. website i test : http://test2.peteroudenes.com Kind regards, Peter Oudenes
3 Answers
This question is very implementation dependent. However, most software use http cookies to track sessions. Is it possible that your hostname changed as a result of moving your website to your new droplet?

If so, you might need to update the configuration of your application with the new hostname. It's possible your generating cookies for your old hostname and the browser isn't sending them on subsequent http requests.
Hi Jason,

I have used "search and replace" to update the whole dB so the hostnames are correct.
But i will check again some other files... maybe some are add in non dB files.
And please give me other possible sollutions so i can try that as well.
Hi Jason,

First what i did was checking my .htacces... and removed:

########## Begin - Disable cookies for static elements subdomain
#
#

php_value session.use_cookies 0

#

php_value session.use_cookies 0

#
#
########## End - Disable cookies for static elements subdomain

This was add by w3 super cache plugin.

Now the sessions is working again :)
Thanks for the move on and look further tip :)

Cheers
Have another answer? Share your knowledge.