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

Resolve warning about zabbix-web(5.0.x) on php8.1

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Major Major
    • None
    • 5.0.39
    • Frontend (F)
    • None

      I don't know if zabbix 5.0.x officially supports php8.1, but if possible, please support the following

      vi /usr/share/zabbix/include/classes/db/MysqlDbBackend.php

      -------------------------
      164	-$tls_mode = null;
      164	+$tls_mode = 0;
      -------------------------
      

      *null can no longer be used in "mysqli::real_connect" flag

      vi /usr/share/zabbix/include/func.inc.php

      -------------------------
      107 -setcookie($name, $value, isset($time) ? $time : 0, CSession::getDefaultCookiePath(), null, HTTPS, true);
      107 +setcookie($name, !is_null($value) ? $value : "", isset($time) ? $time : 0, CSession::getDefaultCookiePath(), "", HTTPS, true);
      -------------------------
      *null is no longer allowed as a setcookie argument
      

      vi /usr/share/zabbix/include/classes/screens/CScreenProblem.php

      -------------------------
      // Replace "strftime" with "date("***", strtotime())
      

      -------------------------
      *strftime is deprecated

            zabbix.dev Zabbix Development Team
            ohtanz Yohsuke Ohkouchi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: