Skip to content

Zabbix: Required parameter $sql_parts follows optional parameter $table_alias

We are running our monitoring solution zabbix on an arch linux system. Arch linux tends to be "up to date" since it philosophie is "patch current code base, not legacy".

I've updated the monitoring system and with that, the php version jumped from 7.4.x to 8.0.x.

After that, a lot of "widgets" (boxes) in the zabbix frontend displayed me a lot of the following error.

Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]

I've researched it and found that the error exists in the DB.php class. I've opened the issue Ticket ZBX-18984 and created the pull request 39 on the github source code. Hopefully, this fix will make it quickly into the code. I've added a git patch file to the issue. You can download and apply it on your system.