[ZBX-11154] Errors in SQL query in db.inc.php with MariaDB Created: 2016 Sep 02  Updated: 2017 May 30  Resolved: 2016 Sep 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Kalle Tuulos Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 16.04.1 LTS (64bit) with following:
PHP 7.0.8
MariaDB 10.0.25
Zabbix 2.4.7
Zabbix-frontend-php 2.4.7

NOTE - Ubuntu 16.04.01 does not seem to have the standard 2.4.8 version, instead it has the 2.4.7 version.



 Description   

Following error message is given in dashboard:

Illegal offset type [dashboard.php:145 ? make_latest_issues() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CScript->getScriptsByHosts() in /usr/share/zabbix/include/classes/api/services/CScript.php:322]
array_flip(): Can only flip STRING and INTEGER values! [dashboard.php:145 ? make_latest_issues() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CScript->getScriptsByHosts() ? CScript->get() ? CHostGroup->get() ? dbConditionInt() ? array_flip() in /usr/share/zabbix/include/db.inc.php:861]
Error in query [SELECT DISTINCT g.groupid FROM groups g,hosts_groups hg WHERE AND hg.groupid=g.groupid] [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND hg.groupid=g.groupid' at line 1]
array_flip(): Can only flip STRING and INTEGER values! [dashboard.php:145 ? make_latest_issues() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CScript->getScriptsByHosts() ? CScript->get() ? CScript->addRelatedObjects() ? CHost->get() ? dbConditionInt() ? array_flip() in /usr/share/zabbix/include/db.inc.php:861]
Error in query [SELECT h.hostid FROM hosts h WHERE h.flags IN (0,4) AND AND h.status IN (0,1)] [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND h.status IN (0,1)' at line 1]



 Comments   
Comment by richlv [ 2016 Sep 02 ]

php7 support was added in ZBX-9700, and zabbix 2.4 is not supported anymore.
thus this issue probably a duplicate of ZBX-9700

Comment by Kalle Tuulos [ 2016 Sep 02 ]

I'm sorry, but I don't see any common elements with this and ZBX9700, except they both are about 2.4 series with PHP7.

In case Zabbix 2.4 is not supported any more, should this error then be raised to Ubuntu, in order to get Zabbix package upgraded to newer version?

Comment by richlv [ 2016 Sep 02 ]

indeed, zabbix 2.4 is not supported by the upstream for a few months now - you might want to report that to ubuntu.

Comment by Aleksandrs Saveljevs [ 2016 Sep 05 ]

Closing as "Won't fix" as per the comments above.

Generated at Wed Jul 16 10:11:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.