The sample script "/scripts/password-hash.sh" is hardcoded to use a PHP interpreter at "/usr/bin/php". This obviously fails if PHP is installed elsewhere. Other scripts in the same directory use "/usr/bin/env php" to find the interpreter which is preferable for portability.

CommentFileSizeAuthor
#8 drupal7core-phpenv-2559335-8.patch223 bytesepophoto

Comments

andrewmk created an issue. See original summary.

cilefen’s picture

That is interesting - the Drupal 8 version has #!/usr/bin/env php but the Drupal 7 version says:

 * Check for your PHP interpreter - on Windows you'll probably have to
 * replace line 1 with
 *   #!c:/program files/php/php.exe

I wonder if that is for a reason.

cilefen’s picture

cilefen’s picture

Title: Sample script hardcoded to use "/usr/bin/php" » password-hash.sh is hardcoded to use "/usr/bin/php"
cilefen’s picture

Issue tags: +Novice

It will be easy for a novice to create this patch.

cilefen’s picture

It should have been backported in #2108573: password-hash.sh is broken, but let's fix it here.

epophoto’s picture

Being an interested novice I will put together a patch for this now... brb :)

epophoto’s picture

Status: Active » Needs review
StatusFileSize
new223 bytes

I back-ported the same change from the D8 core, the only line changed here is the php env declaration at the top of the password-hash.sh file.

cilefen’s picture

Status: Needs review » Reviewed & tested by the community

@epophoto Nice work!

David_Rothstein’s picture

Version: 7.39 » 7.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

  • David_Rothstein committed 5663123 on 7.x
    Issue #2559335 by epophoto, cilefen, andrewmk: password-hash.sh is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.