安装Lilina时,进入后台时报错:
Warning: gzdecode(): data error in /usr/local/apache/htdocs/news/inc/core/Lilina/HTTP.php on line 254
参考:http://blog.csdn.net/haohaojian/article/details/8846465
原因:PHP在5.4版本后,已经自包含了gzdecode()函数,开发者自己定义的gzdecode()函数会与其冲突。
解决方案:
找到出错代码:
function gzdecode($data, &$filename = '', &$error = '', $maxlength = null)
把这个函数用下面的代码包括起来
if (! function_exists('gzdecode')) {
//将gzdecode函数包括进来
}
OK,找到Linina的inc/core/Lilina/HTTP.php的254行,把:
if (function_exists('gzdecode') && ($decoded = gzdecode($data)) !== false) {
return $decoded;
}
修改为:
if (! function_exists('gzdecode') && ($decoded = gzdecode($data)) !== false) {
return $decoded;
}
问题解决。