Or the new PHP altered the behavior of the "global" statement so the value of $db is not passed into functions or got overwritten?
I am poking around in the code...just baffled. Interesting...
Printable View
I just installed PHP 5.2.0 on a test windows machine running IIS, along with Zen Cart v1.3.6, and it works without any errors.
I have found something interesting:
http://drupal.org/node/61900
SuSE 10.0 with kernel 2.6.x.y here.
Hey DrByte, I think the above link likely addresses the same issue here. Look at the "Finally Tracked This Down" part and the "Problem Background" part:
Quote:
Finally Tracked This Down
This is a bug PHP's behavior with global variables. I have a simplified test case which shows the problem in operation and offers a fix.
This has been hard to resolve - this "login issue" can manifest itself from other bugs that involve session ID's and cookies. This is yet another issue.
Looks similar. I don't see a resolution there that's of much use to anyone other than the PHP folks ... :mellow:
I put a var_dump($db) before line 61 in sessions.php and it printed NULL.
The question is, why this global variable issue only affects the session code? Other zen-cart functions all work well - browsing products, adding to cart, etc... I would expect other functions also use "global" to pass in class objects, don't they?
:sleepy: My clients on my server also have the same issue... There seems to be a issue with ZenCart and php-5.2. In order to correct the issue I had to roll back php to 5.1.6.
Any Idea when a fix/patch will be released?
If one of you is interested in providing me with FTP+admin access to your PHP 5.2.0 server, I'll be happy to debug and come up with a solution.
PM me with details and I'll look at it this evening ...