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

PHP 8: Automatic fetching of PostgreSQL connection is deprecated

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 6.0.3
    • None
    • Frontend (F)
    • None
    • Ubuntu 22.04 with PHP 8.1 and PostgreSQL 14.2

    Description

      Hi guys, just upgraded one of my test servers running 6.0.3 to Ubuntu 22.04 and have started getting a ton of these errors.

       

      pg_escape_string(): Automatic fetching of PostgreSQL connection is deprecated [zabbix.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → PostgresqlDbBackend->init() → zbx_dbstr() → pg_escape_string() in include/db.inc.php:913]pg_parameter_status(): Automatic fetching of PostgreSQL connection is deprecated [zabbix.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → PostgresqlDbBackend->init() → pg_parameter_status() in include/classes/db/PostgresqlDbBackend.php:249]pg_escape_string(): Automatic fetching of PostgreSQL connection is deprecated [zabbix.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → PostgresqlDbBackend->isConnectionSecure() → zbx_dbstr() → pg_escape_string() in include/db.inc.php:913]pg_escape_string(): Automatic fetching of PostgreSQL connection is deprecated [zabbix.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DbBackend->checkDbVersion() → PostgresqlDbBackend->checkDbVersionTable() → zbx_dbstr() → pg_escape_string() in include/db.inc.php:913]pg_escape_string(): Automatic fetching of PostgreSQL connection is deprecated [zabbix.php:22 → require_once() → ZBase->run() → ZBase->initDB() → DBconnect() → DbBackend->checkDbVersion() → PostgresqlDbBackend->checkDbVersionTable() → zbx_dbstr() → pg_escape_string() in include/db.inc.php:913]

       

       

      Also getting a ton of these which I suspect is related

       

      Return type of CCookieSession::open($save_path, $session_name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25]Return type of CCookieSession::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice [zabbix.php:22 → require_once() → ZBase->run() → ZBase->authenticateUser() → CAutoloader->loadClass() → require() → CAutoloader->loadClass() → require() in include/classes/core/CCookieSession.php:25] 

       

       

      Attachments

        Activity

          People

            zabbix.support Zabbix Support Team
            cmdr.adama Adam Ricket
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: