Jump to content

Problem in Production - urgent! SESSION variables disappearing


marmite

Recommended Posts

This is a really odd one.

 

I have one page, bulkview.php, which shows various products with a GET param, e.g. http://www.cardsunlimited.com/bulkview.php?id=pink_rose

 

This bulkview page processes information differently depending whether the previous page (stored in $_SESSION['prevpage']) was greetingscards.php, retailgreetingcards.php, or partyinvitations.php.

 

So, e.g. it only shows cellophane-wrapped cards to users who've come via retailgreetingcards.

 

But the page won't add to cart for those who've come via retailgreetingcards !! It works on Test. It works for all other routes. It was working yesterday, or the day before.

 

The problem seems to be that all SESSION variables are unsetting themselves when users click Add to Cart but why? why??

 

I don't know where to start on this one. Can anyone help?

 

Emma

 

Yep.

 

I've done a few print_rs and narrowed down the problem.

 

My SESSION['prevpage'] and SESSION['currpage'], which determine all the cart functions, are resetting from retailgreetingcards.php and bulkview.php respectively, to bulkview.php and notfound.php respectively (i.e. 404 error).

 

This is happeniing BEFORE the code below is called... it's like some sort of weird refresh error, just for users who've come via a certain page... baffled

 

if (!isset($_GET['deleteid'])) {
if ($_SESSION['currpage']) {
	$_SESSION['prevpage']=$_SESSION['currpage'];
	$_SESSION['prevquery']=$_SESSION['currquery'];
}
$_SESSION['currpage']=$_SERVER['PHP_SELF'];
$_SESSION['currquery']=$_SERVER['QUERY_STRING'];
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.