phpMyAdmin 5.2.1 on Ubuntu 20.04 Error After Logon (Unknown named parameter $$dbi)

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:

However the issue has been identified by the development team:

The quick steps to fix the problem:

  1. Edit the file (nano, vi, etc.)
  2. 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));
  3. Save and close the file.  Refresh the browser (or try to log in again) and you should now have a working phpMyAdmin instance.
This entry was posted in Uncategorized. Bookmark the permalink.