Isha Lad
Isha Lad

Reputation: 111

phpmyadmin deprecation notice php 8

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

Upvotes: 10

Views: 42604

Answers (10)

Pradeep Rajvanshi
Pradeep Rajvanshi

Reputation: 115

This is what worked for me on my ubuntu-20 system. We can configure it in the phpmyadmin settings itself.

Please refer the screenshot and observe the send error reports field and set it to Never send error reports

enter image description here

Upvotes: 0

iodurocarburo
iodurocarburo

Reputation: 21

If there are some twig consoles in

ls -lha /usr/share/phpmyadmin/tmp/twig

Delete all in one time

rm -R /usr/share/phpmyadmin/tmp/twig

Upvotes: 0

Mohammad Farhad
Mohammad Farhad

Reputation: 21

  1. Open your xampp control panel.

  2. Go to apache > config > phpMyAdmin(config.inc.php) file.

  3. Just add this line in below of all code in this file...

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

Upvotes: 1

picobaz
picobaz

Reputation: 1

open : your_ip_or_domain/phpmyadmin/prefs_forms.php?form=Features

Then put the value of the option (Send error reports) on the option (Never send error reports).

Upvotes: 0

ShapCyber
ShapCyber

Reputation: 3652

I had the same error message on Debian 11 after switching from php7.4 to php8.1.

What solved the issue was upgrading phpMyAdmin to the latest version manually.

=======Steps to followed=====

Back up phpMyAdmin

You should back up your current phpMyAdmin folder by renaming it.

 $ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

Create a new phpMyAdmin folder

$ sudo mkdir /usr/share/phpmyadmin/

Change to the directory

$ cd /usr/share/phpmyadmin/

Download and Extract phpMyAdmin

$ sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz

Now extract

$ sudo tar xzf phpMyAdmin-*-all-languages.tar.gz
Once extracted, list folder

$ ls

You should see a new folder phpMyAdmin-*-all-languages

We want to move the contents of this folder to /usr/share/phpmyadmin

$ sudo mv phpMyAdmin-*-all-languages/* /usr/share/phpmyadmin

Make a copy of /usr/share/phpmyadmin/config.sample.inc.php

$ sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php

Now edit the config.inc.php

$ sudo nano config.inc.php

$cfg['blowfish_secret'] = 'Zbwen/BEAFv:HTbqOROrqakJ;KUMIpV:'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

$ Ctrl+x /* to save the file */

Go to your site/phpmyadmin check all error is cleared.

=================================================

YOU MAY ENCOUNTER THIS ERROR MESSAGE ON PHPMYADMIN /INDEX.PHP

IT MAY SAY SOMETHING LIKE:

The $cfg['TempDir'] (/usr/share/phpmyadmin/tmp) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

===SOLUTION==

$ sudo mkdir -p /var/tmp/phpMyAdmin

$ sudo chown www-data:www-data /var/tmp/phpMyAdmin

$ sudo chmod -R 700 /var/tmp/phpMyAdmin

Edit the config.inc.php again

$ sudo nano config.inc.php

add or replace this line

$cfg['TempDir'] = '/var/tmp/phpMyAdmin';

Cleanup -- You can now delete the tar.gz file and the empty folder.

$ sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz

And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.

$ sudo rm -rf /usr/share/phpmyadmin.bak

Upvotes: 15

Philipp Galliker
Philipp Galliker

Reputation: 49

I just used the standard update function from MAMP PRO itself. Menu MAMP PRO > Check for Updates… There i Run Install on the update phpMyAdmin5 5.1.0 -> 5.2.0. That worked for me.

Upvotes: 2

DevelJoe
DevelJoe

Reputation: 1302

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!

Upvotes: 2

user18608745
user18608745

Reputation:

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';

Upvotes: 24

Souvik_001
Souvik_001

Reputation: 1

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

Upvotes: 0

RkstyleX
RkstyleX

Reputation: 23

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!

Upvotes: 2

Related Questions