phpmyadmin deprecation notice php 8

Viewed 3126

After upgrading phpmyadmin lots of warnings and notices is being shown while running any task. errors is shown below.

Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40 realpath(): Passing null to parameter #1 ($path) of type string is deprecated

Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35

Return type of Twig\Markup::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Deprecation Notice in .\libraries\classes\Util.php#1936

Function strftime() is deprecated

4 Answers

For PHP 7.3+

Edit the following file : config.inc.php. It can be located in /etc/phpmyadmin/config.inc.php or in /usr/share/phpmyadmin/config.inc.php

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

From now you can turn off errors following these two steps:

  1. Open /usr/share/phpmyadmin/themes/pmahomme/layout.inc.php
  2. Add after <?php error_reporting(0);

Please note that this is not official information!

if you use a wamp server then you can put down the downloaded files from [https://www.phpmyadmin.net/downloads/] of PHPMyAdmin new version on apps folder. then go to alias folder and you have to change in phpmyadmin.conf

Alias /phpmyadmin "d:/wamp64/apps/phpmyadmin5.2.0/" //change it here

<Directory "d:/wamp64/apps/phpmyadmin5.2.0/"> //change it here

then Save and Restart wamp services

I had the same issue after upgrading my PHP Version to 8.1 using MAMP's phpmyadmin 5. I could only find out a way to get rid of it thanks to this here:

  • Go to your phpmyadmin, even if it repeatedly logs deprecation warnings into your page
  • Select the Preferences Tab in your phpmyadmin interface (you have to be in your main phpmyadmin page for this tab to show up, and not have any table / db selected)
  • Select Functions and scroll down to Error Reports and select Never send and click on OK to save it. done!

I though that this should technically correspond to this:

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

But as it seems, there are additional steps involved. Anyway, working now!

Related