PHP session being cleared on one page

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.

The issue is that one particular page, view basket, for some reason clears the session in FIREFOX when you view it.

Read More

I have this section of code in my functions file to start the session:

function init_sessions() {
if (!session_id()) {
    session_start();
}
}
add_action('init', 'init_sessions');

The following sessions are set when logging in:

$_SESSION['id']=$db['id'];
$_SESSION['timer']=time()+3600;
$_SESSION['remote_ip']=$_SERVER['REMOTE_ADDR'];

I tried removing the entire contents of the view basket script whilst leaving the print_r($_SESSION) in and it still got reset.

To replicate the view the website in FIREFOX: http://www.greengrocerschoice.co.uk

Login with email: test@bytewire.co.uk and password: password

Add a product or two to your basket then navigate to http://www.greengrocerschoice.co.uk/viewbasket/ when you reload the page having viewed this page you will notice that you are no longer logged in.

The following version of WordPress is being used: You are using WordPress 3.0.1.

Does anyone have any heads up on what might be causing the issues or tips to debugging to determine what is causing the issue?

Thanks

Related posts

Leave a Reply