How to Manually Upgrade phpMyAdmin

Материал из Home wiki
Версия от 10:07, 26 февраля 2019; KOleg (обсуждение | вклад) (Новая страница: «[https://devanswers.co/manually-upgrade-phpmyadmin/ Original] . ( This page used only for private purposes) Since the release of Ubuntu 18.04 and other Linux dis…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигации Перейти к поиску

Original . ( This page used only for private purposes)

Since the release of Ubuntu 18.04 and other Linux distros, many people have been having compatibility issues with PHP 7.2 and phpMyAdmin 4.6. In this article we will manually download and install the latest version of phpMyAdmin to resolve these issues.

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 directory

cd /usr/share/phpmyadmin/

Download and Extract phpMyAdmin

Visit the phpMyAdmin download page and look for the .tar.gz URL and download it using wget. In this guide, we are using version 4.8.5. If you are using a later version, make sure to change the commands below to match.

sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.tar.gz

Now extract

sudo tar xzf phpMyAdmin-4.8.5-all-languages.tar.gz

Once extracted, list folder

ls

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

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

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

You can now log back into phpMyAdmin and check the current version. You may also see two errors:

Phpmyadmin-blowfish-tempdir-not-accessible.png

Edit vendor_config.php

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.

Open vendor_config.php

sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php

Press CTRL + W and search for TEMP_DIR

Change line to

/usr/share/phpmyadmin/libraries/vendor_config.php
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');

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. Blowfish secret

Press CTRL + W and search for CONFIG_DIR

Cleanup

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

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

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

Hurrah!

Update


Change line to

/usr/share/phpmyadmin/libraries/vendor_config.php define('CONFIG_DIR', '/etc/phpmyadmin/'); phpMyAdmin will now generate its own blowfish secret based on the install directory.

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

Now log back in to phpMyAdmin and ensure the errors are gone.


I get an error about blowfish.

The secret passphrase in configuration (blowfish_secret) is too short

Reply

DevAnswers.co says: February 2, 2019

Open the file /var/lib/phpmyadmin/blowfish_secret.inc.php

Search for blowfish_secret and generate a random string at least 40 chars long.

$cfg['blowfish_secret'] = 'your_long_string';

Save and exit.


hx worked nicely but is still get : The secret passphrase in configuration (blowfish_secret) is too short. Any tips?

Reply

Allan V Pimble Sr says: December 25, 2018

You probably missed the second edit :

where he changes: define(‘CONFIG_DIR’, ‘ ‘);

to: define(‘CONFIG_DIR’, ‘/etc/phpmyadmin/’);