Reputation: 1489
I am trying to clone and install civicrm-buildkit using Git bash.
After successfully cloning, I tried running command but got the following error:
Failed to locate command PHP.
Please install it (and set path appropriately).
Can any please tell me how I can set the PHP command path?
(I am running on Windows 7)
Upvotes: 0
Views: 434
Reputation: 1324258
The civicrm/civicrm-buildkit
does list PHP as a prerequisite:
PHP 5.3+ (For MAMP/XAMPP/etc, see Setup Command-Line PHP)
For Windows, you can follow Command Line PHP on Microsoft Windows (after installing php first):
- Append the location of the PHP executable (
php.exe
,php-win.exe
orphp-cli.exe
depending upon your PHP version and display preferences) to thePATH
environment variable. Read more about how to add your PHP directory to PATH in the corresponding FAQ entry.- Append the
.PHP
extension to thePATHEXT
environment variable. This can be done at the same time as amending thePATH
environment variable. Follow the same steps as described in the FAQ but amend thePATHEXT
environment variable rather than thePATH
environment variable.- Associate the
.PHP
extension with a file type.
This is done by running the following command:
assoc .php=phpfile
- Associate the
phpfile
file type with the appropriate PHP executable.
This is done by running the following command:
ftype phpfile="C:\PHP5\php.exe" -f "%1" -- %~2
Upvotes: 1