Ad Widget

Collapse

Problems with zabbix-2.0.8+PHP-5.5.0+mysql-5.6.13 - mysqli problems in db.inc.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • huri.filho
    Junior Member
    • Jul 2007
    • 2

    #1

    Problems with zabbix-2.0.8+PHP-5.5.0+mysql-5.6.13 - mysqli problems in db.inc.php

    I have a Zabbix Server v1.8.5 server running very well in a FreeBSD 8.1-RELEASE with PHP 5.3.2 and mysql-server-5.1.48. Now I am trying to install a new server in parallel to migrate for the new release of the Zabbix, but I am having problems with the discontinuation of the mysql function to the new mysqli.
    I did the patch indicated in this link :https://support.zabbix.com/browse/ZB...:all-tabpanel; but after that I had the following problems:

    * Error in query [SELECT DISTINCT t.triggerid,t.priority,h.name AS hostname,h.host,h.hostid FROM triggers t,functions f,items i,hosts h WHERE NOT EXISTS (SELECT NULL FROM functions f,items i,hosts h WHERE t.triggerid=f.triggerid AND f.itemid=i.itemid AND i.hostid=h.hostid AND (i.status<>0 OR h.status<>0)) AND t.status=0 AND t.value='1' AND t.flags IN ('0','4') AND f.triggerid=t.triggerid AND f.itemid=i.itemid AND h.hostid=i.hostid AND t.triggerid BETWEEN 000000000000000 AND 099999999999999] [Unknown column 'h.name' in 'field list']
    * mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given [include/db.inc.php:567]
    * mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given [include/db.inc.php:568]

    Someone could help me?
  • wurstyin
    Junior Member
    • May 2014
    • 2

    #2
    Problems with zabbix-2.x : mysqli problems in db.inc.php

    Hi Huri,

    I got this issue too when I upgraded from zabbix version 2.0.6 to version 2.2.10 and version 2.4.7.
    The issue root cause is in fact the new mysqli connection to MySQL DB.
    I had to make few changes in my php installation also and hack the include/db.inc.php.

    But please note that I am not a root user so perhaps it will be more simple for you.

    I recommend you to:
    - check your php installation that module mysqli is installed. You must have --with-mysqli
    (On my side I compiled sources with php options:
    --with-apxs2=$(HTTPD_BUILD_DIR)/bin/apxs \
    --with-gd \
    --enable-libxml \
    --with-zlib \
    --with-png-dir \
    --with-jpeg-dir \
    --with-freetype-dir \
    --enable-bcmath \
    --enable-ctype \
    --with-ldap=$(OPENLDAP_BUILD_DIR) \
    --enable-sockets \
    --enable-mbstring \
    --with-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
    --with-pdo-mysql=mysqlnd \
    --with-gettext
    - In case it's already not working you can hack the include/db.inc.php code by adding directly your login, password ... inside.
    -> Read this post: https://www.zabbix.com/forum/showthr...=zabbix+mysqli

    I hope it will help
    Bye

    Comment

    Working...