系统环境:LNMP
Linux: Centos 7.2
Nginx:1.10.3
MysqL:5.6.35
PHP:5.4.16
安装zabbix-server
1 Repository installation
rpm-ivhhttp://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
2 Install Zabbix-server
yuminstall-yzabbix-releasezabbix-server-MysqLzabbix-getzabbix-webzabbix-web-MysqLzabbix-agent
3 Creating initial database
shell>MysqL-uroot-p<root_password> MysqL>createdatabasezabbixcharactersetutf8collateutf8_bin; MysqL>grantallprivilegesonzabbix.*tozabbix@localhostidentifiedby'<password>'; MysqL>quit;
zcat/usr/share/doc/zabbix-server-MysqL-3.2.*/create.sql.gz|MysqL-uzabbix-pzabbix
4 Database configuration for Zabbix server
#vi/etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=<password>
5Starting Zabbix server process
#systemctlstartzabbix-server #systemctlenablezabbix-server
6PHP configuration for Zabbix frontend
vi/etc/PHP.ini max_execution_time300 memory_limit128M post_max_size16M upload_max_filesize2M max_input_time300 always_populate_raw_post_data-1 date.timezoneAsia/Shanghai@H_301_90@
7. copy frontend web files
cp-R/usr/share/zabbix/usr/local/Nginx/html@H_301_90@
8. Starting Service
/etc/init.d/PHP-fpm systemctlrestartNginx systemctlstartzabbix-server.service@H_301_90@
9. Install web
问题
A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPMemoryLimit() → str2mem() in include/func.inc.PHP:410]
A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPPostMaxSize() → str2mem() in include/func.inc.PHP:410]
A non well formed numeric value encountered [zabbix.PHP:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPHPUploadMaxFilesize() → str2mem() in include/func.inc.PHP:410]
安装完成之后启动就出现这个问题,这个是因为PHP 7.1.0类型强化,处理方法也很简单找到Zabbix WEB目录下include/func.inc.PHP文件
问题解决
sed-i'/$last=strtolower(substr($val,-1));/a$val=substr($val,-1);'/usr/local/Nginx/html/zabbix/include/func.inc.PHP