Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19086

Zabbix deprication issues with PHP 8.0+

    XMLWordPrintable

Details

    • Patch request
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 5.2.4, 5.2.5
    • None
    • None
    • Linux, PHP v8.0.2 Nginx

    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]

      Attachments

        Issue Links

          Activity

            People

              ArtursL Arturs Lontons
              stars Kevin Lakusta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: