Answers.Body: <p>I just took a look and the reference to <code>php</code> in the bash scripts seems to be hardcoded.  I'm assuming there's already a <code>php</code> app with a different version, or else you could just put a symlink from <code>php56</code> to <code>php</code> somewhere in your path.  So I think your best bet is to:</p>
  
  <ul>
  <li>Create that symlink anyway, but don't put it in your default path.  E.g. <code>ln -s /usr/bin/php56 /my/folder/php</code>.</li>
  <li>Add a line to <code>civibuild</code> (or call from a wrapper script) that puts the symlink at the BEGINNING of your path, so it's found before your regular php.  E.g. <code>PATH="/my/folder:$PATH"</code>.</li>
  </ul>
  
  <p>By putting the symlink in the path only when <code>civibuild</code> is called it won't cause interference with your other applications that rely on a different PHP version to run.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-22T17:42:48.430Z
Answers.LastActivityDate: 2018-01-22T17:42:48.430Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>Buildkit comes with a configuration file <code>app/civibuild.conf.tmpl</code> (that essentially functions as a wrapper script) that you should consider using instead of writing your own.</p>
  
  <p>Copying it to app/civibuild.conf and adjusting the path to suit your needs should do the trick.</p>
  
  <p>You'll still need to manage the symlink (as you and Jon mentioned).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-16T16:51:23.073Z
Answers.Text: I have fixed it with the Jons suggestion. And the civibuild.conf was not the solution in my case as it does not contains a parameters for the path the php executable.
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-16T20:06:25.877Z
Answers.Text: Hmm, can you not add a directory to PATH variable that contains the php executable you want it to use?
Answers.UserDisplayName: michaelmcandrew
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-15T10:32:39.327Z
Answers.LastActivityDate: 2018-02-15T10:32:39.327Z
Answers.UserDisplayName: michaelmcandrew
Body: <p>I have buildkit installed on my computer however the php command is called php56. </p>
  
  <p>The civibuildkit command fails because it is looking for a command called php.</p>
  
  <p>Is there an easy way I could change the settings in buildkit so it will use the php56 command?</p>
  
  <p><strong>Solution</strong></p>
  
  <p>I put a symlink in /home/jaap/php56/php to the php56 binary and then I created a wrapper script.</p>
  
  <pre><code>mkdir /home/jaap/php56
  ln -s /usr/bin/php56 /home/jaap/php56/php
  </code></pre>
  
  <p>Then I created a script in /home/jaap/bin/civibuild.sh:</p>
  
  <pre><code>#!/bin/bash
  
  export PATH="/home/jaap/php56:$PATH"
  /home/jaap/bin/civicrm-buildkit/bin/civibuild $@
  </code></pre>
  
Tags: <civicrm-buildkit>
Title: Buildkit and php binary is called php56
ThreadText: # Buildkit and php binary is called php56
  
  (Asked by: username_0 on 2018-01-22)
  
  I have buildkit installed on my computer however the php command is called php56. 
  The civibuildkit command fails because it is looking for a command called php.
  Is there an easy way I could change the settings in buildkit so it will use the php56 command?
  Solution
  I put a symlink in /home/jaap/php56/php to the php56 binary and then I created a wrapper script.
  mkdir /home/jaap/php56
  ln -s /usr/bin/php56 /home/jaap/php56/php
  
  Then I created a script in /home/jaap/bin/civibuild.sh:
  #!/bin/bash
  
  export PATH="/home/jaap/php56:$PATH"
  /home/jaap/bin/civicrm-buildkit/bin/civibuild $@
  
  **Tags:** civicrm-buildkit
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-01-22. Score: 2 | Accepted answer
  
  I just took a look and the reference to `php` in the bash scripts seems to be hardcoded. I'm assuming there's already a `php` app with a different version, or else you could just put a symlink from `php56` to `php` somewhere in your path. So I think your best bet is to:
  
  * Create that symlink anyway, but don't put it in your default path. E.g. `ln -s /usr/bin/php56 /my/folder/php`.
  * Add a line to `civibuild` (or call from a wrapper script) that puts the symlink at the BEGINNING of your path, so it's found before your regular php. E.g. `PATH="/my/folder:$PATH"`.
  
  By putting the symlink in the path only when `civibuild` is called it won't cause interference with your other applications that rely on a different PHP version to run.
  
  
  ---
  
  ### Answer by username_2 on 2018-02-15. Score: 0
  
  Buildkit comes with a configuration file `app/civibuild.conf.tmpl` (that essentially functions as a wrapper script) that you should consider using instead of writing your own.
  
  Copying it to app/civibuild.conf and adjusting the path to suit your needs should do the trick.
  
  You'll still need to manage the symlink (as you and Jon mentioned).
  
  > **Comments:**
  > **username_0**: I have fixed it with the Jons suggestion. And the civibuild.conf was not the solution in my case as it does not contains a parameters for the path the php executable.  
  > **username_2**: Hmm, can you not add a directory to PATH variable that contains the php executable you want it to use?  
  
  ---
  
  