zabbix php无法显示怎么办
时间:2021-05-24
来源:互联网
标签:
今天PHP爱好者为您带来zabbix php无法显示的解决办法:1、安装apache;2、完整安装php;3、修改apache并使其提供对php的支持;4、将mysql的socket.sock文件软链接到zabbix的路径。希望对大家有所帮助。

zabbix php无法显示怎么办
本文操作环境:linux5.9.8系统、PHP5.6版,DELL G3电脑
zabbix安装好了打不开?apache配置zabbix下setup.php无法显示?
1、web页面无法显示:
原因一:检查系统是否安装apache,以便解析html
原因二:php没有完全安装好
原因三:apache没有提供对php的支持
原因四:apache的配置文件中DocumentRoot的参数值没有改成zabbix的路径,zabbix默认的路径 是/var/www/html/下
解决方案一:安装apache
tar zxvf httpd-2.2.23.tar.gz
cd httpd-2.2.23
./configure --prefix=/usr/local/apache
make && make install
若安装过程中出现错误, 则在编译时入加 --with-included-apr 参数。
解决方案二:完整安装php
安装php时首先要检查系统是否安装了支持zabbix的依赖包,特别GD库的安装,如果gd库没安装会 导致zabbix安装过程出现问题。
<1>安装freetype,libpng,jpeg以便于让php支持GD库(WeatherMap插件必须要较新的GD库支持)
tar -zxvf libpng-1.2.18.tar.gz
./configure --prefix=/usr/local/libpng
make && make install
tar -zxvf freetype-2.3.5.tar.gz
./configure --prefix=/usr/local/freetype
make &&make install
tar -zxvf jpegsrc.v7.tar.gz
mkdir /usr/local/libjpeg
mkdir /usr/local/libjpeg/bin
mkdir /usr/local/libjpeg/lib
mkdir /usr/local/libjpeg/man
mkdir /usr/local/libjpeg/man/man1
./configure --prefix=/usr/local/libjpeg/ --enable-shared --enable-static
make && make install
tar -zxvf gd-2.0.28.tar.gz
./configure --prefix=/usr/local/libgd --with-png --with-freetype=/usr/local/freetype/ --with- jpeg=/usr/local/libjpeg/
make && make install
安装完成后,对gd库进行配置:
vi /etc/ld.so.conf
/usr/local/freetype/lib
/usr/local/libjpeg/lib
/usr/local/libgd/lib
ldconfig --------执行命令,使用动态装入器装载找到的共享库
<2>安装PHP
cd php-5.6.0
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with- mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-bcmath --enable- mbstring --enable-sockets --with-gd --with- gettext --with-freetype-dir=/usr/local/freetype/ --with-jpeg- dir=/usr/local/libjpeg/
make clean
make && make install
安装完后将tar包中的php.ini-development或php.ini-production复制到到/usr/local/php/lib下,并更名为php.ini
-with-apxs2=/usr/local/apache/bin/apxs支持apache
--with-mysql=/usr/local/mysql/支持mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config优化支持mysqli
--enable-bcmath打开图片大小调整
--enable-mbstring多字节,字符串的支持
--enable-sockets打开sockets 支持
--with-gd打开gd库的支持
--with-gettext打开gnu的gettext 支持,编码库用到
--with-freetype-dir=/usr/local/freetype/打开对freetype字体库的支持
--with-jpeg-dir=/usr/local/libjpeg/打开对jpeg图片的支持
推荐学习:《PHP视频教程》
解决方案三:apache没有提供对php的支持
打开apache的配置文档/usr/local/apache/conf/httpd.conf,修改其中参数
模块中修改为
DirectoryIndex index.html index.php
模块中添加
AddType application/x-httpd-php .php .php3 .php4
修改完成后需重新启动apache
2、访问目录http://ip/zabbix会显示:
Forbidden
You don't have permission to access /test/ on this server.
解决方案:
在apache的配置文档中找到,其中定义了Deny from all,可以将其注释,就不会封网段
3、zabbix在安装过程中出现无法找到sock文件的问题
解决方案:
将mysql的socket.sock文件软链接到zabbix的路径
4、登录进zabbix页面中,页面显示如下错误:
ini_set(): Use of mbstring.internal_encoding is deprecated [dashboard.php:21 → require_once() →
ZBase->run() → ZBase>initLocales() → init_mbstrings() →
ini_set() in /var/www/html/zabbix/include/locales.inc.php:25]
解决方案:
将路径中/var/www/html/zabbix/include/locales.inc.php的第25行数据注释掉,页面不会显示错误
以上就是zabbix php无法显示怎么办的详细内容,更多请关注php爱好者其它相关文章!
-
Ext.MessageBox消息框使用详解 时间:2025-11-20 -
GAppProxy超详细安装配置教程 时间:2025-11-20 -
C#中e.Cancel用法详解 e.Cancel和e.Handled区别 时间:2025-11-20 -
TestDirector超详细下载、安装、配置教程 时间:2025-11-20 -
AssemblyInfo.cs文件详解(常见属性及作用等) 时间:2025-11-20 -
什么是无理数 常见的无理数有哪些 无理数和有理数的区别 时间:2025-11-19
今日更新
-
伤不起的梗是什么梗?揭秘网络热词背后的爆笑真相!
阅读:18
-
明日方舟:终末地地区建设-地区建设系统使用手册
阅读:18
-
币安账户安全验证指南:如何有效规避洗钱风险
阅读:18
-
恋与深空福利活跃活动-奇趣妙探活动11月21日开启
阅读:18
-
2025年狗狗币(DOGE)币价格预测:狗狗币能否迎来反弹浪潮?
阅读:18
-
崩坏3回归要多少天-崩坏3回归用户天数要求
阅读:18
-
物华弥新琉璃塔拱门-免伤减伤大成体器者
阅读:18
-
恋与深空五星思念甜野极驰-11月21日开启限时UP
阅读:18
-
逆水寒神相pve元素流-新木桩一键10w+搭配
阅读:18
-
币安风控日志查询指南:快速定位查看方法
阅读:18










