ERROR (example):
Deprecation Notice in ./../../php/Twig/Loader/FilesystemLoader.php
realpath(): Passing null to parameter #1 ($path) of type string is deprecated
Backtrace
FilesystemLoader.php: realpath(NULL)
./libraries/classes/Template.php: TwigLoaderFilesystemLoader->__construct(string ‘/usr/share/phpmyadmin//templates/’)
./libraries/classes/Theme.php: PhpMyAdminTemplate->__construct()
./libraries/classes/Theme.php: PhpMyAdminTheme->__construct()
./libraries/classes/ThemeManager.php: PhpMyAdminTheme::load(
string ‘./themes/pmahomme’,
string ‘/usr/share/phpmyadmin/./themes/pmahomme/’,
)
./libraries/classes/ThemeManager.php: PhpMyAdminThemeManager->loadThemes()
./libraries/classes/ThemeManager.php: PhpMyAdminThemeManager->__construct()
./libraries/classes/ThemeManager.php: PhpMyAdminThemeManager::getInstance()
./libraries/common.inc.php: PhpMyAdminThemeManager::initializeTheme()
./index.php: require_once(./libraries/common.inc.php)
***
Deprecation Notice in ./../../php/Twig/Node/Node.php
Return type of TwigNodeNode::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Backtrace
autoload.php: require(./../../php/Twig/Node/Node.php)
{closure}(string ‘Twig\Node\Node’)
TwigFilter.php: class_exists(string ‘Twig\Node\Node’)
autoload.php: require(./../../php/Twig/TwigFilter.php)
CoreExtension.php: {closure}(string ‘Twig\TwigFilter’)
ExtensionSet.php: TwigExtensionCoreExtension->getFilters()
ExtensionSet.php: TwigExtensionSet->initExtension()
ExtensionSet.php: TwigExtensionSet->initExtensions()
Environment.php: TwigExtensionSet->getFilter(string ‘error’)
./../../../../../../var/lib/phpmyadmin/tmp/twig/49/49433f77d3462b2488dfef3699484854e3c55e4b348dae30482fadd1ce008731.php: TwigEnvironment->getFilter(string ‘error’)
Template.php: __TwigTemplate_95dd0b99dd97a989e49170a5554a1e0ce6595b0346e92b70254c854745cea47e->doDisplay(
array,
array,
)
Template.php: TwigTemplate->displayWithErrorHandling(
array,
array,
)
Template.php: TwigTemplate->display(array)
TemplateWrapper.php: TwigTemplate->render(
array,
array,
)
./libraries/classes/Template.php: TwigTemplateWrapper->render(array)
./libraries/classes/Plugins/Auth/AuthenticationCookie.php: PhpMyAdminTemplate->render(
string ‘login/header’,
array,
)
./libraries/classes/Plugins/AuthenticationPlugin.php: PhpMyAdminPluginsAuthAuthenticationCookie->showLoginForm()
./libraries/common.inc.php: PhpMyAdminPluginsAuthenticationPlugin->authenticate()
./index.php: require_once(./libraries/common.inc.php)
How to FIX:
Update your phpMyAdmin manualy…
Enter to the directory:
cd /usr/share/
Rename your phpMyAdmin directory to phpmyadmin.bak:
mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
Create a new phpMyAdmin folder:
mkdir /usr/share/phpmyadmin/
Enter to the directory:
cd /usr/share/phpmyadmin/
Download and extract phpMyAdmin:
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
tar xzf phpMyAdmin-*-all-languages.tar.gz
List folders:
ls
You should see a new folder phpMyAdmin-*-all-languages
Move the contents of this folder to /usr/share/phpmyadmin:
mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin
Make a copy of /usr/share/phpmyadmin/config.sample.inc.php:
cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc
Edit the /usr/share/phpmyadmin/config.inc.php
Search line:
$cfg[‘blowfish_secret’] = ”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
And change to (example):
$cfg[‘blowfish_secret’] = ‘2RQ&Vb&ShmZMJcSR’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Search line (example):
$cfg[‘TempDir’] = ‘/tmp’;
And change to:
$cfg[‘TempDir’] = ‘/var/tmp/phpMyAdmin’;
if you don’t have this line (Temporary Directory Config), after line declare(strict_types=1);, add:
$cfg[‘TempDir’] = ‘/var/tmp/phpMyAdmin’;
Create temporary directory:
mkdir -p /var/tmp/phpMyAdmin
chown www-data:www-data /var/tmp/phpMyAdmin
chmod -R 700 /var/tmp/phpMyAdmin
Cleanup:
rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz
Now check your new phpMyAdmin installation is working correctly, if working correctly you can delete backup folder:
rm -rf /usr/share/phpmyadmin.bak
write your question bellow in the “Leave a Reply” form.
Thanks!
On November 28th, 2020, the PHP community issued a deprecation notice for the popular open source web application, phpMyAdmin. The notice came as part of the release of PHP 8, the latest version of the programming language. phpMyAdmin was originally developed as an interface used to manage MySQL databases on web servers, and has since grown into a widely used open source application that can also manage MariaDB, PostgreSQL, and other databases.
The deprecation notice states that, in the interest of performance, security, and accuracy, the implementation of mysqlnd driver for phpMyAdmin will be removed in favor of mysqli (or its object-oriented variant). This new driver offers better handling of database queries and quoting of strings. The phpMyAdmin development team also noted that they will no longer support the use of the mysql extension in phpMyAdmin or any other application.
In addition to these changes, the phpMyAdmin developers have also released modified versions of their existing application that are compatible with PHP 8. Users should upgrade their versions of phpMyAdmin in order to take advantage of the new features and performance improvements.
The deprecation of the mysql extension in favor of mysqli has long been a worry for phpMyAdmin users. Although it may be difficult for some users to make the transition, the new benefits are hard to deny. The improved performance, security and accuracy provided by mysqli make the move to PHP 8 a wise decision for most, if not all, phpMyAdmin users.