On Ubuntu 20.04 (Focal Fossa) running PHP 8.2, you may run into an issue after installing the latest phpMyAdmin (5.2.1) using the PPA (ppa:phpmyadmin/ppa).
When you try to log in to phpMyAdmin, you will get the following message:
Error: Unknown named parameter $$dbi
I first found discussion about the issue on Stack Overflow, but neither solutions would result in staying on the PPA:
https://stackoverflow.com/questions/76213404/error-unknown-named-parameter-dbi-in-phpmyadmin-5-2-1
However the issue has been identified by the development team:
https://github.com/phpmyadmin/phpmyadmin/issues/16968
https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu#known-issues
https://github.com/phpmyadmin/phpmyadmin/issues/18498
https://github.com/symfony/symfony/commit/8e34978e4e2c4bf7dac97e44e904368c4cfb54f8
The quick steps to fix the problem:
- Edit the file (nano, vi, etc.)
/usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php
- Change this line
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
to look as follows:
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments));
- Save and close the file. Refresh the browser (or try to log in again) and you should now have a working phpMyAdmin instance.