Aurel Alexandru VOICU
Aurel Alexandru VOICU

Reputation: 31

Upgrading to phpMyAdmin 5.1.2 throws Undefined array key "hide_connection_errors"

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

Upvotes: 2

Views: 3814

Answers (3)

ENU ENAN
ENU ENAN

Reputation: 147

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

Upvotes: 1

malisokan
malisokan

Reputation: 5467

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.

Upvotes: 0

Isaac Bennetch
Isaac Bennetch

Reputation: 12462

This was caused by a problem with the 4.9.8 and 5.1.2 releases. For 4.9, it has already been fixed with 4.9.9, and for 5.2, a new release of 5.1.3 is anticipated soon.

For me, the easiest thing to do is simply ignore the error until the new release, but you could use the commit to manually patch your installation.

See also https://github.com/phpmyadmin/phpmyadmin/issues/17307 and https://github.com/phpmyadmin/phpmyadmin/issues/17304

Upvotes: 3

Related Questions