PHP object disappearing

OK guys,
My server was recently updated to php 5 (about time), but now my simple shopping cart isn’t working. This was working before and I hadn’t changed the code. I cannot figure out what the problem is because it all looks correct to me (and was working before!).

If you look at where I’ve commented “debugging” in application_top.php, I’ve narrowed it down to my shopping cart object getting destroyed on the page refresh. Everything else seems to be fine.

Please help,
-Joshua