分页: 1 / 1

1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-07 11:00
sunrise
[07-Jan-2015 02:49:52] PHP Parse error: syntax error, unexpected T_STATIC in /home/admin、includes/classes/class.admin.zcObserverLogEventListener.php on line 118

请问如何解决? 谢谢!

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-07 12:34
sunrise
NOTE: This is ONLY necessary if you're using PHP 5.2.x

If your server is still using PHP version 5.2.x (which is VERY OLD and now officially obsolete since 2011) and you try to use ZC v1.5.4 you may encounter an error akin to the following when trying to access the Admin area:

Error:
PHP Parse error: syntax error, unexpected T_STATIC in /admin/includes/classes/class.admin.zcObserverLogEventListener.php on line 118

Fix:
On line 118 of /admin/includes/classes/class.admin.zcObserverLogEventListener, change:
Code:
$levels = static::$levels;
to:
Code:
$levels = self::$levels;
Remember: PHP 5.2.x is obsolete and officially no longer supported by anybody. You should be upgrading your server's PHP version ASAP.

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-10 21:47
sy7600gr
把你的PHP版本升级一下

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-11 11:59
li-he-qi
撸主在二楼给出了答案, 给下中文的

错误是由于PHP版本是5.2.x (从2011年起5.2.X官方已经停止支持了), 如果你用ZC1.5.4, 会遇到以下错误:
代码: 全选
PHP Parse error: syntax error, unexpected T_STATIC in /admin/includes/classes/class.admin.zcObserverLogEventListener.php on line 118


修正方法:
在/admin/includes/classes/class.admin.zcObserverLogEventListener文件中约118行, 找到:
代码: 全选
$levels = static::$levels;

改成:
代码: 全选
$levels = self::$levels;


建议所有使用PHP5.2.X的用户立即升级

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-15 22:02
leogn
改了,可以登录进去了.但是只能看到语言切换的,下面的菜单都看不到,咋回事呢?

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-01-16 3:12
Jack
修改的代码有误,看看 /logs 目录中的日志

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2015-08-08 11:52
huayuhobby
我的是 PHP5.4 哦,怎么也是不能登录后台呢 ?

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2016-04-29 17:05
feihcceo
1.5.4中文插件版,安装完后,后台进不去,啥办?
WARNING: An Error occurred, please refresh the page and try again. Fatal error: 1101:BLOB/TEXT column 'logmessage' can't have a default value :: ALTER TABLE admin_activity_log ADD COLUMN logmessage mediumtext NOT NULL default '' ==> (as called by) D:\wwwroot\030x\admin\includes\classes\class.admin.zcObserverLogWriterDatabase.php on line 90 <== in D:\wwwroot\030x\includes\classes\db\mysql\query_factory.php on line 155

Re: 1.5.4 admin 的错误!!!

帖子发表于 : 2016-10-10 20:08
lxhua88
我同样问题,未解决,请高手?