ecshop暴出Notice: unserialize() 的解决办法

2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家



Notice: unserialize() [function.unserialize]: Error at offset 130 of 138 bytes in /data/www/wwwroot/**************/includes/cls_session.php on line 163

Notice: unserialize() [function.unserialize]: Error at offset 130 of 138 bytes in /data/www/wwwroot/************/includes/cls_session.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /data/www/wwwroot/*****************/includes/cls_session.php:163) in /data/www/wwwroot/*****************/includes/init.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /data/www/wwwroot/*****************/includes/cls_session.php:163) in /data/www/wwwroot/*****************/includes/init.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /data/www/wwwroot/*******************/includes/cls_session.php:163) in /data/www/wwwroot/*****************/includes/cls_template.php on line 58

cls_session.php的211行改成:
$data= base64_encode(serialize($GLOBALS['_SESSION']));
cls_session.php的163行改成:
$GLOBALS['_SESSION']= unserialize(base64_decode($session['data']));
cls_session.php的178行改成:
$GLOBALS['_SESSION']= unserialize(base64_decode($session_data['data']));


修改时请慎重!!!