php5の環境でzen cartのバグ対応
Posted: 5月 29th, 2008 | Author: focajun | Filed under: zen cart | No Comments »Fatal error: zen-cart/includes/functions/strict_sessions.php on line 66
がでたら、zencartにはログインできない。よって、ソースコードを変更し、PHP5のバグ対応をしなければいけない。以下
strict_sessions.phpの55行目あたりの
function _sess_write($key, $val) {
global $db;
global $SESS_LIFE
を
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;

Leave a Reply