skip to Main Content

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

Deprecation Notice in .vendortwigtwigsrcLoaderFilesystemLoader.php#40
realpath(): Passing null to parameter #1 ($path) of type string is deprecated

Deprecation Notice in .vendortwigtwigsrcMarkup.php#35

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

Deprecation Notice in .librariesclassesUtil.php#1936

Function strftime() is deprecated

6

Answers


  1. 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!

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. 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';
    
    Login or Signup to reply.
  4. 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!

    Login or Signup to reply.
  5. 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.

    Login or Signup to reply.
  6. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search