Why does $_SESSION only work when I am logged in?


I am including a pure PHP library (nothing to do with WordPress) into a few of my page templates. This library calls PHP session_start() function and references the $_SESSION[“cart”] global variable. Because of the session_start I include the library at the top of my template.

When I am logged in the library functions exactly as it is supposed to, but when I log out, the $_SESSION variables appear not to store data. Any ideas to fix this?

Vial 2 months 0 Answers 12 views 0

Leave an answer