Page 1 of 1
Trouble with $g_crypto_master_salt
Posted: 19 May 2017, 12:04
by rowan_bradley
Yesterday I tried to update my installation of Mantis BT using the Softaculous installer. It said that it had upgraded successfully, but now when I go to my URL I get:
# --- Security --- $g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM='; Possible Whitespace/Error in Configuration File - Aborting. Output so far follows:
string(92) " # --- Security --- $g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM='; "
I see several bug reports about this type of issue, but nothing that tells me how to recover, so that my installation works. What do I have to do now? Can I manually add a line to the config file (which currently doesn't seem to refer to $g_crypto_master_salt at all)? If so, how do I create a value for $g_crypto_master_salt?
Thanks - Rowan
Re: Trouble with $g_crypto_master_salt
Posted: 19 May 2017, 18:52
by atrol
I can't tell anything about Softaculous installer.
It seems this installer added some lines after the PHP closing tag ?>.
Removing the tag might fix the issue.
Re: Trouble with $g_crypto_master_salt
Posted: 23 May 2017, 13:18
by rowan_bradley
Which is th aactive config file, that it is complaining about?
I have a file config_inc.php. Is that the one?
That did contain:
====beginning of file=====
<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'sylvest_mantisbt';
$g_db_username = 'sylvest_mantadm';
$g_db_password = '8r2fa@8WRTfP';
?>
# --- Security ---
$g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM=';
=====end of file=====
I changed it to:
====beginning of file=====
<?php
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'sylvest_mantisbt';
$g_db_username = 'sylvest_mantadm';
$g_db_password = '8r2fa@8WRTfP';
# --- Security ---
$g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM=';
?>
=====end of file=====
It still gives the error:
# --- Security --- $g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM='; Possible Whitespace/Error in Configuration File - Aborting. Output so far follows:
string(92) " # --- Security --- $g_crypto_master_salt = 'OXMxbGh3dmczbHlqNmFuaTV3Y2c0d2kwcXdzeG9iaWM='; "
Which whitespace is it complaining about?
Do I need this $g_crypto_master_salt value?
Thanks - Rowan
Re: Trouble with $g_crypto_master_salt
Posted: 23 May 2017, 14:15
by atrol
rowan_bradley wrote:
I have a file config_inc.php. Is that the one?
It's the right one if it's stored in folder config. Maybe there is one more config_inc.php from older versions in root folder of your installation.
rowan_bradley wrote:
Do I need this $g_crypto_master_salt value?
You need it.
BTW, $g_crypto_master_salt and $g_db_password should be kept secret.
Re: Trouble with $g_crypto_master_salt
Posted: 17 May 2018, 10:57
by Louisvdw
The problem you have is that the salt was added to the config after the closing of the PHP code.
Move
?>
to the edit of the file after the
$g_crypto_master_salt
line to solve the problem.
Re: Trouble with $g_crypto_master_salt
Posted: 17 May 2018, 13:49
by rowan_bradley
I mentioned previously in the thread, I have already done this.
My public_html/mantisbt/config/config_inc.php file now looks like this:
Code: Select all
?php
$g_hostname = 'localhost';
$g_db_type = 'mysqli';
$g_database_name = 'sylvest_mantisbt';
$g_db_username = 'sylvest_mantisbt';
$g_db_password = 'secret_password';
$g_default_timezone = 'Europe/London';
$g_crypto_master_salt = 'secret_value';
?>
Mantis now seems to be working correctly, at least as far as the actions I have done recently.
Thanks for your help with this issue.
Rowan