ict-support@lirauni.ac.ug

+256-394010378

How to Solve a Phpmyadmin Deprecation Notice error in Ubuntu 20.04

  1. Remotely log into your server;
    $ ssh username@ip_address
  2. Type:
    $ sudo apt update
  3. Back up phpMyAdmin. You should back up your current phpMyAdmin folder by renaming it:
    $ sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
  4. Create a new phpMyAdmin folder:
    $ sudo mkdir /usr/share/phpmyadmin/
    Change to directory:
    $ cd /usr/share/phpmyadmin/
  5. Download and Extract phpMyAdmin. Go to the phpMyAdmin download page and look for the latest .tar.gz URL and download it using wget. As of this writing, we are using version 5.1.3:
    $ sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.1.3/phpMyAdmin-5.1.3-all-languages.tar.gz.
    Now extract:
    $ sudo tar xzf phpMyAdmin-5.1.3-all-languages.tar.gz.
    Once extracted, list folder:
    $ ls -lh.
    You should see a new folder phpMyAdmin-5.1.3-all-languages. We want to move the contents of this folder to /usr/share/phpmyadmin:
    $ sudo mv phpMyAdmin-5.1.3-all-languages/* /usr/share/phpmyadmin
ERRORS THAT MAY SURFACE, THE SOLUTIONS ARE AS SHOWN BELOW; SOLUTION 1
If you are seeing an error “The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.”
  1. Open vendor_config.php:
    $ sudo vi /usr/share/phpmyadmin/libraries/vendor_config.php
  2. Type;
    :/TEMP_DIR in command mode to search for TEMP_DIR.
    Change line to:
    define(‘TEMP_DIR’, ‘/var/lib/phpmyadmin/tmp/’);
SOLUTION 2
You may also see an error “The configuration file now needs a secret passphrase (blowfish_secret). The blowfish secret is used by phpMyAdmin for cookie authentication.”
  1. Type;
    :/CONFIG_DIR in command mode to search for CONFIG_DIR.
    Change line to:
    define(‘CONFIG_DIR’, ‘/etc/phpmyadmin/’);
    PhpMyAdmin will now generate its own blowfish secret based on the install directory.
  2. Save file and exit by Typing:
    :wq!
  3. Now log back in to phpMyAdmin and ensure the errors are gone.