nagiosQL访问时报错PHP message: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_re

nagiosQL安装环境:php

CentOS release 6.4 (Final)ios

php-5.5.4nginx

nagiosql_320sql

nginx version: nginx/1.2.3函数

 

安装一切正常,当访问nagiosQL界面时会提示:.net

PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead日志

 

查看nginx日志提示:get

PHP message: PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback insteadio

 

解决方法:语法

因为方法preg_replace()为PHP 5.5.x 中废弃的特性,官方建议须要在代码中将preg_replace()替换为函数preg_replace_callback,能够问题解决。 (具体请见官方介绍:

http://www.php.net/manual/zh/migration55.deprecated.php

此问题涉及到nagiosQL文件:/usr/local/nagios/nagiosql/libraries/pear/HTML/Template/IT.php

因为本人并不太熟悉PHP语法,故暂没法经过替换函数解决。

故无奈之下将PHP版本恢复至php-5.4.21,最终问题解决。

此问题是因为nagiosql_320,当前未对php5.5进行良好的支持致使的,可能会在之后的版本发布中解决此问题。若是有哪位同仁已经解决此问题,但愿能将修改后IT.php的代码发给我,咱们共同进步。

 

值得注意的是,咱们在安装对PHP支持的页面时,必定要查看好当前页面对PHP版本的支持,不然极易出现各类问题。

相关文章
相关标签/搜索