I recently upgraded to PHP 8.0.2 and noticed that the zabbix web environment ceased to work due to a new deprecation in the latest version of PHP mentioned here: https://php.watch/versions/8.0/deprecate-required-param-after-optional.
The one error that prevented any of the graphs from working was
Deprecated: Required parameter $type follows optional parameter $level in/usr/share/webapps/zabbix/include/triggers.inc.php on line 1269 - Which I managed to fix by moving $type in front of $level, but I am still stuck with the numerous errors in my attached screenshot, because I lack the experience with PHP I am not able to fix it at this point, but I thought I should let everyone else know that this is an issue. I am going to downgrade back to PHP7 to fix this issue for now.
Steps to reproduce:
- Upgrade to PHP 8.0
- Install latest zabbix version
Result:
Screenshot in attachment, followed by 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]
- duplicates
-
ZBX-18984 >>Required parameter $sql_parts follows optional parameter<< when running zabbix web on php 8.0.2
- Closed