[ZBX-19086] Zabbix deprication issues with PHP 8.0+ Created: 2021 Mar 05  Updated: 2021 Mar 08  Resolved: 2021 Mar 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 5.2.4, 5.2.5
Fix Version/s: None

Type: Patch request Priority: Trivial
Reporter: Kevin Lakusta Assignee: Arturs Lontons
Resolution: Duplicate Votes: 0
Labels: PHP, PHP-FPM
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, PHP v8.0.2 Nginx


Attachments: PNG File 2021-03-04-150620_1738x820_scrot.png    
Issue Links:
Duplicate
duplicates ZBX-18984 >>Required parameter $sql_parts follo... Closed

 Description   

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:

  1. Upgrade to PHP 8.0
  2. 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]



 Comments   
Comment by Arturs Lontons [ 2021 Mar 08 ]

Hi, Kevin.

We're aware of the issue, as per ZBX-18984. You can read some of the discussions in the mentioned bug report - there's also a community patch there that partially resolves the issue. We're also working on fixing this from our side.

Closing as duplicate.

Generated at Thu Jun 12 13:13:26 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.