Sessions problem


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 :

Kind regards, Peter Oudenes

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi Jason, <br> <br>First what i did was checking my .htacces… and removed: <br> <br>########## Begin - Disable cookies for static elements subdomain <br># <br># <br><IfModule mod_php5.c> <br>php_value session.use_cookies 0 <br></IfModule> <br># <br><IfModule mod_php4.c> <br>php_value session.use_cookies 0 <br></IfModule> <br># <br># <br>########## End - Disable cookies for static elements subdomain <br> <br>This was add by w3 super cache plugin. <br> <br>Now the sessions is working again :) <br>Thanks for the move on and look further tip :) <br> <br>Cheers

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

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? <br> <br>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.