Re: php 5.2.0 update problem
Quote:
Originally Posted by
sh33pz
: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?
As a workaround: you don't have to roll back to php 5.1.6. Just change your session to be "file based" from "database based" in the ZenCart config file: includes/configure.php and admin/includes/configure.php
This way you can still run ZenCart while taking advantage of the PHP 5.2.0 security and bug fixes. But I would still prefer to switch back to database-based session for security sometime later when we find a solution.
Re: php 5.2.0 update problem
Aww sweet, Thanks for the info.
Will try that out later tonite
Re: php 5.2.0 update problem
Meanwhile others find the same problem:
http://community.mybboard.net/showth...d=13506&page=1
And it's been reported now:
http://bugs.php.net/bug.php?id=39381
So it's not ZC which is giving php a bad rep like this twit claims
http://caseysoftware.com/zend-conference-2006-day-2
but php.net themselves which first quarrel about 5.2.0 for several weeks and then YET again don't get it right so half the world is laughing about more bugged or better f***ed-up php-releases :shocking: Like last time 5.1.6 when they "forgot" something for the 64bit uP, unbelievable. This is really gonna start to pi55 me off now ... :cry:
Re: php 5.2.0 update problem
And more from another completely different project:
http://www.dotproject.net/vbulletin/showthread.php?p=26051
:sleepy:
Re: php 5.2.0 update problem
Thanks for the info bud :) So it's off to php.net to bug them for a fix Thanks to everyone for their help! My clients will be happy to know.. its php itself to blame not Zen Cart !!!
As fir the Zen Cart Coders... Keep up the good work! I kinda figured after.. it must be php itself.. I just couldn't see ya guys.. over look this!
Re: php 5.2.0 update problem
It appears as though PHP has assigned the bug to someone for fixing.
However, in the meantime, you have two options:
a. use file-based caching instead of database-based (not really a good solution, but works around the problem, but is less secure and much less flexible for most hosting environments. 'db' is really the better choice except in the case of this PHP bug):
configure.php file:
define('STORE_SESSIONS', '');
OR:
A Suggested Bandage:
b. edit /includes/functions/sessions.php
and /admin/includes/functions/sessions.php, if it exists on your site:
Code:
function _sess_write($key, $val) {
global $db;
global $SESS_LIFE;
change to:
Code:
function _sess_write($key, $val) {
// The following is only to work around a PHP 5.2.0 bug:
global $db;
if (!is_object($db)) {
//PHP 5.2.0 bug workaround ...
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
}
global $SESS_LIFE;
Option (b) may or may not be "complete", and has only had preliminary testing. The best fix will be to have PHP fix their bug, of course.
NOTE: If this fix "works" for you, then you need to upgrade your version of Zen Cart ... sooner than later. The latest version of Zen Cart contains a number of fixes related to PHP5 and MySQL5. You should plan your upgrade ... soon.
Addendum: There are some other technical approaches which could be used to address the session_write_close() and register_shutdown_function() changes introduced in this new PHP version. These may be explored in the future. For now, the above approaches are the simplest to implement for those needing to make a quick-fix to their code.
Re: php 5.2.0 update problem
Thanks
it is working now.
Re: php 5.2.0 update problem
Thanks for the workaround DrByte! :clap: :cheers:
Re: php 5.2.0 update problem
The related PHP bug (http://bugs.php.net/bug.php?id=39381) was updated by the PHP developer asking for sample code to reproduce. Anyone can provide one? DrByte? :)
Re: php 5.2.0 update problem
Hello ! This is my first post on zen-cart forum ! I wanna thank you very much to DrByte ! Good job. Best regards!