网店ecshop出现无权限下面的解决办法

你如果在用ecshop的时候,出现如下错误:
Notice: unserialize() [function.unserialize]: Error at offset 130 of 138 bytes in /data/www/wwwroot/**************/includes/cls_session.php on line 163

不要害怕,这是ecshop的一个小bug,不会一直出现,当有特殊字符保存在session里面的时候才会出现,如何解决呢?修改cls_session.php文件的如下3个地方就OK了。

注意:修改前先备份文件:网站根目录includescls_session.php

解决方法:

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’]));

保存后,记得在后台清理一下缓存,这样就OK了~~

发表评论

电子邮件地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>