[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: |
![]() |
||||||||
Issue Links: |
|
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:
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 Closing as duplicate. |