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
Trouble with $g_crypto_master_salt
Moderators: Developer, Contributor
Re: Trouble with $g_crypto_master_salt
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.
It seems this installer added some lines after the PHP closing tag ?>.
Removing the tag might fix the issue.
-
- Posts: 3
- Joined: 19 May 2017, 11:52
Re: Trouble with $g_crypto_master_salt
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
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
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: I have a file config_inc.php. Is that the one?
You need it.rowan_bradley wrote: Do I need this $g_crypto_master_salt value?
BTW, $g_crypto_master_salt and $g_db_password should be kept secret.
Re: Trouble with $g_crypto_master_salt
The problem you have is that the salt was added to the config after the closing of the PHP code.
Move
Move
to the edit of the file after the?>
line to solve the problem.$g_crypto_master_salt
-
- Posts: 3
- Joined: 19 May 2017, 11:52
Re: Trouble with $g_crypto_master_salt
I mentioned previously in the thread, I have already done this.
My public_html/mantisbt/config/config_inc.php file now looks like this:
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
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';
?>
Thanks for your help with this issue.
Rowan