Zabbix故障:Apache源码和页面上的PHP红色提示

2022-07-13 12:47:08 浏览数 (1)

昨天把ansible-tower安装在这机器上,然后把原来的nginx霸占了,逼迫把zabbix的web换上了apache,源码安装上apache和重新编译php后,就出现这个php错误提示。

把php.ini的session路径改了,然后再把session目录递归权限改为777,然后重启php和apache即可。

附上关于zabbix的apache和php的源码指定的模块

./configure --prefix=/usr/local/php  --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-pdo-mysql=/usr/local/mysql  --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir  --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl  --with-mcrypt --enable-soap  --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

wget https://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gz wget https://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz wget https://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.gz   ./configure --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util  --enable-so --enable-mods-shared=most

  ★ 在zabbix页面上显示A session had already been started - ignoring session_start()这个提示,把session.auto_start = 1改为0即可

编辑httpd.conf文件

添加如下代码

LoadModule php7_module modules/libphp7.so AddType application/x-httpd-php .php DirectoryIndex index.php index.htm index.html

0 人点赞