Ad Widget

Collapse

PHP/Database problems after upgrading 4.4.8 -> 5.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel_Georgetti
    Junior Member
    • May 2020
    • 3

    #1

    PHP/Database problems after upgrading 4.4.8 -> 5.0

    Hi,

    I have a virtual Zabbix Appliance machine wich was running Ubuntu 16.04 and Zabbix 4.4.8.
    After reading in the documentation that Ubuntu 16.04 does not have support to PHP 7.2, I decided to upgrade to Ubuntu 18.04 prior to upgrading Zabbix to 5.0.

    After proceeding with both upgrades, the zabbix page got messed up (as in the attached image) and I received an alert e-mail saying:

    Subject: Zabbix database is not available.
    Message: MySQL database "zabbix" on "localhost" is not available: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    However, Zabbix-server, Apache2 and MySQL services are all running just fine and I am able to connect to the database normally.

    The Grafana server I have connected to my Zabbix also stoped receiving data, so it makes me believe I have 2 problems, one regarding to the PHP page and another to the database.

    Can someone help me please?

    Regards,

    Daniel

    Attached Files
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    The page display issue is showing that your web server is not running the page through PHP, it's just sending the source code of the page to the client. This almost always means that httpd has not been set up to handle PHP. Either you need to load the PHP module and configure it to handle PHP files or (the preferred method, these days) you need to set up PHP-FPM to run in a separate process (with its own set of workers) and then configure httpd to proxy PHP requests to PHP-FPM.

    Regarding MySQL: if you're using the command-line 'mysql' client to connect, then it's looking up the socket path that's probably set in a MySQL config file (/etc/my.cnf or perhaps somewhere in /etc/my.cnf.d/*.cnf). Whatever path the mysql client is using to successfully connect, you need to be sure that if you're specifying DBSocket in /etc/zabbix/zabbix_server.conf that you're using the same socket path.

    Comment

    Working...