Upgrading to phpMyAdmin 5.1.2 throws Undefined array key "hide_connection_errors"

Viewed 2789

After upgrading to this version I received this error: Undefined array key "hide_connection_errors". How could I solve this?

Server: MySQL Server (127.0.0.1 via TCP/IP)
Tip de server: MySQL
Conexiune server: Nu se folosește SSL Documentație
Versiune server: 8.0.26 - Source distribution
Versiune protocol: 10
Set de caractere server: UTF-8 Unicode (utf8mb4)
Apache
Versiune client bază de date: libmysql - mysqlnd 8.0.15
Extensie PHP: mysqli curl mbstring
Versiune PHP: 8.0.15

3 Answers

Git Commit link This works for me. Simply edit your config.php file in xampp\phpMyAdmin\libraries\classes.

Copy and paste below lines. At line 1436 -> $server['hide_connection_errors'] = $cfg['Server'] enter image description here

at line 1509 ->

if (! isset($server['hide_connection_errors'])) {
            $server['hide_connection_errors'] = false;
        }

enter image description here

This bug in phpMyAdmin 5.1.2 has been fixed in this GitHub Commit.

Solution: Use the patch or simply modify this file: phpMyAdmin\libraries\classes\Dbal\DbiMysqli.php Search for 'hide_connection_errors' and add an is-set check two times.

Line 168: if (isset($server['hide_connection_errors']) && $server['hide_connection_errors']) {

Line 215: if ($error_number === 1045 && isset($server['hide_connection_errors']) && $server['hide_connection_errors']) {

In the latest XAMPP release (xampp-windows-x64-8.1.2-0-VS16) you may also want to use phpMyAdmin 5.1.2 instead the included one 5.1.1, because 5.1.1 has many PHP 8 warnings.

Related