I have way too many hours into this and I feel as though it is due to a configuration difference somewhere between the two servers. Here is code for two simple scripts:
<?php session_start(); $cart = array('item_number' => '12345', 'qty' => '5'); $_SESSION['cart'] = serialize($cart); header('Location: test2.php'); exit(); ?>
<?php session_start(); print_r($_SESSION); print_r($_COOKIE); $cart = unserialize($_SESSION['cart']); print_r($cart); phpinfo(); ?>
The scripts behave differently on different machines...
If you go to http://tim.copelanddata.net/test1.php , you will see that the session gets set correctly, and you can refresh test2.php and get the same results.
However, when you go to http://tim.belczak.net/test1.php, the session gets set and is displayed correctly the first time. If you refresh test2.php, the session disappears. It does NOT disappear if unserialize() is not called.
I have included the session and cookie variables as well as phpinfo() for debugging. Please let me know if you can spot the obvious, which I cannot.