When you download and extract latest phpMyAdmin, it comes with a config.sample.inc.php
file. I would like to set a random blowfish_secret
value on this line:
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
So, what I have tried so far is:
#!/bin/bash
cp config.sample.inc.php config.inc.php;
search="\$cfg['blowfish_secret'] = '';";
replace="\$cfg['blowfish_secret'] = '1234';";
sed -i -e 's/$search/$replace/g' config.inc.php;
# debug
echo $search;
echo $replace;
cat config.inc.php;
When I tested this script, the copied config.inc.php
file does not appear to have been updated. Any ideas why? the search
& replace
fields are correctly getting set: