"Deprecation Notice" error in PhpMyAdmin with ubuntu 20.04, php8.0

Viewed 18293

I'am getting error when i login to phpmyadmin

Deprecation Notice in ./libraries/classes/Di/ReflectorItem.php#82 Method ReflectionParameter::getClass() is deprecated

Backtrace

./libraries/classes/Di/ReflectorItem.php#50: PhpMyAdmin\Di\ReflectorItem->_resolveArgs( array, array, ) ./libraries/classes/Di/FactoryItem.php#27: PhpMyAdmin\Di\ReflectorItem->invoke(array) ./libraries/classes/Di/Container.php#62: PhpMyAdmin\Di\FactoryItem->get(array) ./libraries/classes/Di/AliasItem.php#44: PhpMyAdmin\Di\Container->get( string 'PhpMyAdmin\Controllers\Database\DatabaseStructureController', array, ) ./libraries/classes/Di/Container.php#62: PhpMyAdmin\Di\AliasItem->get(array) ./db_structure.php#35: PhpMyAdmin\Di\Container->get( string 'DatabaseStructureController', array, )

5 Answers

You can also disable notifications and warnings adding this line to config.inc.php:

$cfg['SendErrorReports'] = 'never';

Source: PMA Docs

This is most likely caused by using PHP 8 and PHPMyAdmin < v5 either upgrade you PHPMyAdmin to 5.0 or higher or downgrade your PHP to 7

I had the same error. phpMyAdmin 5.1.3 uses PHP 7.1 and phpMyAdmin 4.9.10 uses PHP 5.5 to 7.4 You can see that info here: https://www.phpmyadmin.net/downloads/

I have installed 4.9.5 with apache, so what I did was install PHP7.4 and php7.4-fpm, then I modified the phpMyAdmin apache config file to indicate that it should work with PHP7.4

Install php7.4-fpm:

sudo apt install libapache2-mod-fcgid
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php && sudo apt update
sudo apt install php7.4-fpm
sudo a2enmod actions alias proxy_fcgi fcgid
sudo systemctl restart apache2

Modify phpMyAdmin apache config file:

sudo nano /etc/phpmyadmin/apache.conf 

After Alias /phpmyadmin /usr/share/phpmyadmin paste:

<FilesMatch \.php> # Apache 2.4.10+ can proxy to unix socket
        SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>

You can restart apache again and that's it. Good luck!

Because 5.0 series is ended and 5.1 will be out next this will not be fixed. 5.1 has a new DI system and the classes mentioned in the output do not exist anymore. But you can download the latest version in development (phpMyAdmin 5.1+snapshot) and the DI errors should be gone :)

https://github.com/phpmyadmin/phpmyadmin/issues/16268

I've got a WAMPSERVER installed and what cleared those notices for me was updating phpmyadmin to 5.1.3 that supported PHP 8

Related