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?


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:


export PATH="/home/jaap/php56:$PATH"
/home/jaap/bin/civicrm-buildkit/bin/civibuild $@

2 Answers 2


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.


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).

  • 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. Commented Feb 16, 2018 at 16:51
  • Hmm, can you not add a directory to PATH variable that contains the php executable you want it to use? Commented Feb 16, 2018 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.