Blank page running PhpMyAdmin on nginx with PHP 8.1 pfm

After an apt-get upgrade, phpmyadmin stopped working, I would see a blank page that sets a session cookie but does not show a login screen , just a blank page and the source of the page is also blank

So, i added the following line to my config.inc.php

$cfg['environment'] = 'development';

An right after, the following appeared

Array ( [type] => 1 [message] => Uncaught TypeError: PhpMyAdmin\ConfigStorage\Relation::__construct(): Argument #1 ($dbi) must be of type PhpMyAdmin\DatabaseInterface, null given, called in /var/www/html/pma2/libraries/classes/Twig/RelationExtension.php on line 22 and defined in /var/www/html/pma2/libraries/classes/ConfigStorage/Relation.php:62 Stack trace: #0 /var/www/html/pma2/libraries/classes/Twig/RelationExtension.php(22): PhpMyAdmin\ConfigStorage\Relation->__construct() #1 /var/www/html/pma2/vendor/twig/twig/src/ExtensionSet.php(426): PhpMyAdmin\Twig\RelationExtension->getFunctions() #2 /var/www/html/pma2/vendor/twig/twig/src/ExtensionSet.php(411): Twig\ExtensionSet->initExtension() #3 /var/www/html/pma2/vendor/twig/twig/src/ExtensionSet.php(385): Twig\ExtensionSet->initExtensions() #4 /var/www/html/pma2/vendor/twig/twig/src/Environment.php(810): Twig\ExtensionSet->getUnaryOperators() #5 /var/www/html/pma2/vendor/twig/twig/src/Lexer.php(457): Twig\Environment->getUnaryOperators() #6 /var/www/html/pma2/vendor/twig/twig/src/Lexer.php(108): Twig\Lexer->getOperatorRegex() #7 /var/www/html/pma2/vendor/twig/twig/src/Environment.php(466): Twig\Lexer->__construct() #8 /var/www/html/pma2/vendor/twig/twig/src/Environment.php(516): Twig\Environment->tokenize() #9 /var/www/html/pma2/vendor/twig/twig/src/Environment.php(348): Twig\Environment->compileSource() #10 /var/www/html/pma2/vendor/twig/twig/src/Environment.php(309): Twig\Environment->loadTemplate() #11 /var/www/html/pma2/libraries/classes/Template.php(123): Twig\Environment->load() #12 /var/www/html/pma2/libraries/classes/Template.php(156): PhpMyAdmin\Template->load() #13 /var/www/html/pma2/libraries/classes/Core.php(145): PhpMyAdmin\Template->render() #14 /var/www/html/pma2/libraries/classes/Config.php(684): PhpMyAdmin\Core::fatalError() #15 /var/www/html/pma2/libraries/classes/Common.php(169): PhpMyAdmin\Config->checkPermissions() #16 /var/www/html/pma2/index.php(48): PhpMyAdmin\Common::run() #17 {main} thrown [file] => /var/www/html/pma2/libraries/classes/ConfigStorage/Relation.php [line] => 62 ) 

Turns out, this is an incompatibility (related to session storage) that has only been fixed in the 5.2 snapshot, download that version of phpmyadmin and everything should be fine

Leave a Reply

Your email address will not be published. Required fields are marked *