phpMyAdmin Error - The configuration file now needs a secret passphrase
Solution 1:
This might help, https://wiki.archlinux.org/index.php/PhpMyAdmin#Add_blowfish_secret_passphrase
If you see the following error message at the bottom of the page when you first log in to /phpmyadmin (using a previously setup MySQL username and password) :
ERROR: The configuration file now needs a secret passphrase (blowfish_secret)
You need to add a blowfish password to the phpMyAdmin's config file. Edit /etc/webapps/phpmyadmin/config.inc.php and insert a random blowfish "password" in the line
$cfg['blowfish_secret'] = ; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
It should now look something like this:
$cfg['blowfish_secret'] = 'qtdRoGmbc9{8IZr323xYcSN]0s)r$9b_JUnb{~Xz'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
This all assumes you've already properly created the config file,
cp config.sample.inc.php config.inc.php
Solution 2:
I was also getting the error The configuration file now needs a secret passphrase (blowfish_secret)
when the configuration file had $cfg['blowfish_secret']
set. I'm using CentOS v6 and I installed PHPMyAdmin from the EPEL repo using yum
. I setup nginx to host PHPMyAdmin and the PHPMyAdmin package (by default) is setup to work with Apache. The configuration file is located at /etc/phpMyAdmin/config.inc.php
(you can check CONFIG_DIR
in libraries/vendor_config.php
to find where your config file is located) and if you notice, the user is root and the group is apache
for the file and directory. This causes PHPMyAdmin to not be able to read the configuration file. To fix this problem, use chown
to change the group to the one that is running your webserver (in my case, the group is nginx
). You will need to change the owner for both the directory AND configuration file (as shown below).
chown -R root.nginx /etc/phpMyAdmin/
Note that you may need to do this again if PHPMyAdmin is updated. You may also have further problems with permissions if SELinux is enabled.
Solution 3:
I had
define('CONFIG_DIR', '/etc/phpmyadmin');
in /usr/share/phpmyadmin/libraries/vendor_config.php.
It should be:
define('CONFIG_DIR', '/etc/phpmyadmin/');
(forward slash added)
Solution 4:
The latest version of phpmyadmin does not create the config file after installation. There is an example config file available and an actual default config file deeper in the folder tree.
Note that the blowfish secret must be exactly 32 characters in length else it will not be applied.
Copy the example file to create the actual used file that overrides defaults. The directory shown below is just an example, therefore use the directory/path for your phpmyadmin installation that applies.
cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
At the top of the file is the blowfish variable that needs to be set. Add 32 random characters to the variable's value and then save the file.
$cfg['blowfish_secret'] = 'KLS$vbc91Lkja$vc@opGbxA278EWopdc';
I did not read anyone mentioning the 32 character rule in this thread. Perhaps that was the issue for the OP.