Rootop 服务器运维与web架构

The encoded file has format major ID 7, whereas the Loader expects 4 in xxx.php

php运行报500错误
通过nginx日志查到错误信息为:

Got error 'PHP message: PHP Fatal error:  Incompatible file format:  
The encoded file has format major ID 7, whereas the Loader expects 4 in /www/xxx.php on line 0\n'

大体意思说编码文件格式主ID是7,然而却载入了4
这个问题实际是由zend加密版本导致的。(这个项目的php代码是经过zend加密的)
通过 https://zend18.zendesk.com/hc/en-us/articles/217058968
可以看到php版本与zend加密版本之间的关系。

服务器上目前是安装了php5.3,对应的Zend Encoder ID为4,那么根据日志提示应该换成php5.6解决。

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/4658.html

作者:Venus

服务器运维与性能优化

评论已关闭。