Ad Widget

Collapse

Zabbix frontend is not interpreted as PHP after install

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Azure
    Junior Member
    • Sep 2018
    • 3

    #1

    Zabbix frontend is not interpreted as PHP after install

    Dear Community!

    I am trying to install Zabbix on a VPS.
    Zabbix version: 3.4. Ubuntu version 14.04. Running MySQL

    I have followed the installation instructions provided on https://www.zabbix.com/download (after selecting the above options). I can see from the "top" command that zabbix-server, zabbix-agentd and apache2 are running.

    The problem is that when I try to view mywebsite/zabbix/ (where mywebsite is the URL to the webserver), the server returns the actual PHP file's content without interpreting it as PHP. In other words: I see the raw PHP code. I assume this to be a server configuration issue, but can not find a solution (google provided no help this time).

    Has anyone experienced this issue before and/or has any idea how to deal with it?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Is a module for calling PHP from apache2 installed?

    ex. libapache2-mod-php5

    Comment

    • Azure
      Junior Member
      • Sep 2018
      • 3

      #3
      Hello

      yes, libapache2-mod-php5 is installed

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        I tried installing on Zabbix 3.4.14 on Ubuntu 14.04.5, but no special setting was necessary.
        Here is the command executed.

        Code:
        $ sudo apt-get update
        $ sudo apt-get upgrade
        $ sudo reboot
        $ wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1%2Btrusty_all.deb
        $ sudo dpkg -i zabbix-release_3.4-1+trusty_all.deb
        $ sudo apt-get update
        $ sudo apt-get install mysql-server
        $ sudo vi /etc/mysql/my.cnf
        $ sudo service mysql restart
        $ sudo apt-get install zabbix-agent zabbix-server-mysql zabbix-frontend-php
        $ sudo apt-get install snmp
        $ mysql -uroot -p
        mysql> create database zabbix character set utf8 collate utf8_bin;
        mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
        mysql> exit
        $ zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uroot zabbix -p
        $ sudo vi /etc/zabbix/zabbix_server.conf
        $ sudo vi /etc/apache2/conf-enabled/zabbix.conf
        $ sudo service zabbix-server start
        $ sudo service apache2 restart
        Please check the log file to see if there is an error when starting apache2.
        It may also be useful to restart apache2.

        Comment

        • Azure
          Junior Member
          • Sep 2018
          • 3

          #5
          Hello

          It was probably not related to Zabbix, but general server settings. I gave up on that platform and installed Zabbix on a new version of ubuntu with no issues.

          Comment

          • maarguello
            Junior Member
            • Apr 2023
            • 19

            #6
            Hi!, recently I'm having a similar issue after installa zabbix, any advice?

            my env:
            Description: Ubuntu 22.04.2 LTS
            Release: 22.04
            Codename: jammy

            Click image for larger version

Name:	image.png
Views:	2198
Size:	96.0 KB
ID:	463794

            Comment

            • artooro
              Junior Member
              • Nov 2022
              • 4

              #7
              Having the same issue after upgrade to Ubuntu 22.04
              maarguello what did you do to fix it?

              Comment

              • artooro
                Junior Member
                • Nov 2022
                • 4

                #8
                For what it's worth, what resolved it for me is running the commands:

                Code:
                sudo a2enmod php8.1
                sudo systemctl restart apache2

                For some reason the ubuntu 22.04 upgrade left php7.4 enabled in apache2 instead of enabling php8.1.

                Comment

                Working...