D8 Downloaded Demo: Missing hash_salt in settings.php file

Created on 4 May 2017, almost 8 years ago
Updated 29 June 2023, almost 2 years ago

Hi

Steps Undertaken

I have uploaded & installed the "zircon_d8.zip" file as per the instructions on the Zircon website.
Instructions are in "http://weebpal.com/guide/step-step-guide-install-drupal-8-theme" as per readme file.

Changed the database settings in the "settings.php" file to get access to my database.

Error

Tried to run the system the first time & got this error: "The website encountered an unexpected error. Please try again later."

Looked in the error_log file & got the following error:

[04-May-2017 13:01:13 Europe/Paris] Uncaught PHP Exception RuntimeException: "Missing $settings['hash_salt'] in settings.php." at /home/progres1/public_html/drupal8/core/lib/Drupal/Core/Site/Settings.php line 140

Looking up the settings.php file I find that the hash is blank in line 299, as seen below.
$settings['hash_salt'] = '';

Solution

I needed to input a hash salt myself into the settings.php file

This needs to be documented in the Installation instructions, on the website &/or the readme files.

Thanks

Andy

πŸ› Bug report
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡¦πŸ‡ΊAustralia asdinnie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΈπŸ‡³Senegal diaodiallo

    Thanks a lot for this. I had this issue after deploying a pantheon site to an Ubuntu server with apache.

    Just updated

    if (isset($_ENV['PANTHEON_ENVIRONMENT'])) {
      $settings['hash_salt'] = $_ENV['DRUPAL_HASH_SALT'];
    }

    to

    $settings['hash_salt'] = 'CHANGE_THIS';

Production build 0.71.5 2024