Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP session being cleared on one page
    text
    copied!<p>I have developed a theme in WordPress for an eCommerce website. The website makes use of sessions for the custom login system which I have created.</p> <p>The issue is that one particular page, view basket, for some reason clears the session in FIREFOX when you view it.</p> <p>I have this section of code in my functions file to start the session:</p> <pre><code>function init_sessions() { if (!session_id()) { session_start(); } } add_action('init', 'init_sessions'); </code></pre> <p>The following sessions are set when logging in:</p> <pre><code>$_SESSION['id']=$db['id']; $_SESSION['timer']=time()+3600; $_SESSION['remote_ip']=$_SERVER['REMOTE_ADDR']; </code></pre> <p>I tried removing the entire contents of the view basket script whilst leaving the print_r($_SESSION) in and it still got reset.</p> <p>To replicate the view the website in FIREFOX: <a href="http://www.greengrocerschoice.co.uk" rel="nofollow">http://www.greengrocerschoice.co.uk</a></p> <p>Login with email: test@bytewire.co.uk and password: password</p> <p>Add a product or two to your basket then navigate to <a href="http://www.greengrocerschoice.co.uk/viewbasket/" rel="nofollow">http://www.greengrocerschoice.co.uk/viewbasket/</a> when you reload the page having viewed this page you will notice that you are no longer logged in.</p> <p>The following version of WordPress is being used: You are using WordPress 3.0.1.</p> <p>Does anyone have any heads up on what might be causing the issues or tips to debugging to determine what is causing the issue?</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload