• Home »
  • Errors »
  • The Configuration File Now Needs A Secret Passphrase (blowfish_secret)

The Configuration File Now Needs A Secret Passphrase (blowfish_secret)

When installing phpMyAdmin to manage your MySQL database there are a couple of things you need to completed. You may receive some of the following errors if you do not complete all of the necessary prerequisites but all are easy to resolve.

The first error you will probably run into is the below error.

ERROR: The configuration file now needs a secret passphrase (blowfish_secret)

This can be resolved by copying the sample configuration file to the correct name and making a small modification to it. From the phpMyAdmin directory do the following.

Copy Samlple Configuration File To Real Configuration File:

cp -p config.sample.inc.php config.inc.php

You will then need to edit the file with your favorite editor (mine being vi) and add a blowfish_secret phrase to line 16 like the below example. Use our online blowfish_secret variable generator located here. Our online generator will randomly output between 36 and 46 characters that include lowercase letters, uppercase letters, numbers, and symbols. Just refresh the page if you don’t like the initial output of the random character generator.

Update Blowfish Secret In PHPMyAdmin Configuration File: Line 16

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki .
*
* @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'BLOWFISH PASSWORD HERE'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

After you do this visit your-url/phpadmin-directory where if you don’t have mcrypt and mbstrong installed you will see two more errors. There are easy to resolve by following the directions below.

ERROR: Cannot load mcrypt extension. Please check your PHP configuration.
This is easily resolved by installing php-mcrypt using the bellow command on CentOS.

Install php-mcrypt Using Yum On CentOS Linux:

yum install php-mcrypt

ERROR: The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
This error may not be seen until logging into phpMyAdmin but is also easily resolved by installing mbstring using the below command.

Install php-mbstring Using Yum On CentOS Linux:

yum install php-mbstring

For more information on phpMyAdmin check out the books below.


List Price: $34.99 USD
New From: $13.21 USD In Stock
Used from: $2.40 USD In Stock


List Price: $34.99 USD
New From: $19.95 USD In Stock
Used from: $3.86 USD In Stock

Share