This is a question that was asked in #966140: On upgrade $drupal_hash_salt in the settings.php is never created. but never really answered. In the default.settings.php file, in the description of the $drupal_hash_salt variable, it says
Note that this variable must have the same value on every web server.
What does that mean? Not what it literally says, as surely there are web servers in the world that have different values for that variable.
From #870772: drupal_valid_test_ua() / drupal_generate_test_ua() in bootstrap.inc causes problems with loadbalancers during simpletest runs. I have the impression that maybe it means every web server that is accessing the same database needs to use the same value for $drupal_hash_salt. Is that the idea?
Are there any problems if multiple installations on the same machine accessing separate databases are using the same value for $drupal_hash_salt?
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal-hash_salt-D8-1485810-6.patch | 1.09 KB | nmudgal |
#2 | drupal-hash_salt-D8-1485810-1.patch | 917 bytes | nmudgal |
Comments
Comment #1
jhodgdonSounds like a documentation bug to me. Thanks for reporting it!
Comment #2
nmudgal CreditAttribution: nmudgal commentedAccording to the damien comment here #870772-1: drupal_valid_test_ua() / drupal_generate_test_ua() in bootstrap.inc causes problems with loadbalancers during simpletest runs., I have attached the patch.
Thanks.
Comment #3
brad.bulger CreditAttribution: brad.bulger commentedthat's a bit more clear, but it still doesn't really address the "why?". maybe the comments aren't the right place for that, but i couldn't find any other documentation. that's why i initially posted this as a support request, i thought maybe i just wasn't looking in the right places.
Comment #4
jhodgdonbrad.bulger: If you want support, this isn't the best place to seek it. Although you can create issues in Drupal Core and mark the category as "support request", we don't really handle support requests in the Drupal Core issue queue as a regular practice (that option is mostly there for filing support issues for contributed modules and themes).
There are several support options listed if you click on "Support" at the top of Drupal.org, which will take you to: http://drupal.org/support
Regarding this patch, I think it clears up the documentation issue reasonably well... I don't think we want to have a large discourse on this setting, beyond what's here, in the settings.php file... I would appreciate someone who knows more about this reviewing it for accuracy though.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedI think that's accurate, although "in a cluster" could still be kind of vague when used that way. I would probably have said it more like this:
"Note that if your site is deployed on a cluster of web servers, you must ensure that this variable has the same value on each server."
Comment #6
jhodgdonThanks for the accuracy review David. I think that wording (or something similar) is preferable... can someone roll it into a new patch?
Comment #7
nmudgal CreditAttribution: nmudgal commentedAttached as per #5
Comment #8
jhodgdonThanks! Committed to 8.x/7.x.
Comment #9
nmudgal CreditAttribution: nmudgal commentedThanks :-)