Lösungen für das Problem, dass Zabbix PHP nicht angezeigt werden kann: 1. Apache installieren; von Zabbix.
Die Betriebsumgebung dieses Artikels: Linux5.9.8-System, PHP5.6-Version, DELL G3-Computer
Zabbix kann nach der Installation nicht geöffnet werden? Apache-Konfiguration setup.php kann unter zabbix nicht angezeigt werden?
1. Die Webseite kann nicht angezeigt werden:
Ursache 1: Überprüfen Sie, ob Apache auf dem System installiert ist, um HTML zu analysieren
Ursache 2: PHP ist nicht vollständig installiert
Ursache 3: Apache bietet keine Unterstützung für PHP
Grund 4: Der Parameterwert von DocumentRoot in der Apache-Konfigurationsdatei wurde nicht in den Pfad von zabbix geändert. Der Standardpfad von zabbix ist /var/www/html/
Lösung 1: Apache installieren
tar zxvf httpd-2.2.23.tar.gz cd httpd-2.2.23 ./configure --prefix=/usr/local/apache make && make install
If Während des Installationsvorgangs ist ein Fehler aufgetreten. Kompilieren Sie. Fügen Sie bei Bedarf den Parameter --with-included-apr hinzu.
Lösung 2: PHP vollständig installieren
Bei der Installation von PHP müssen Sie zunächst prüfen, ob das System abhängige Pakete installiert hat, die Zabbix unterstützen, insbesondere bei der Installation der GD-Bibliothek. Wenn die GD-Bibliothek nicht installiert ist, kann dies zu Problemen führen Der Zabbix-Installationsprozess.
<1>Installieren Sie Freetype, libpng und jpeg, damit PHP die GD-Bibliothek unterstützen kann (das WeatherMap-Plug-in muss von einer neueren GD-Bibliothek unterstützt werden)
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
Nach Abschluss der Installation konfigurieren Sie die GD-Bibliothek:
vi /etc/ld.so.conf /usr/local/freetype/lib /usr/local/libjpeg/lib /usr/local/libgd/lib ldconfig --------执行命令,使用动态装入器装载找到的共享库
<2> ;PHP installieren
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
Kopieren Sie nach der Installation php.ini-development oder php.ini-produktion im TAR-Paket nach /usr/local/php/lib und benennen Sie es in 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图片的支持
um Empfohlenes Lernen: „PHP-Video-Tutorial“
Lösung 3: Apache bietet keine Unterstützung für PHP
Öffnen Sie das Konfigurationsdokument von Apache /usr/local/Apache/conf/httpd.conf und ändern Sie die Parameter im Modul
auf
Fügen SieDirectoryIndex index.html index.php
AddType application/x-httpd-php .php .php3 .php4
Forbidden You don't have permission to access /test/ on this server.
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]
Das obige ist der detaillierte Inhalt vonWas tun, wenn Zabbix PHP nicht angezeigt werden kann?. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!