The Server available for our new Drupal project uses an old PHP CLI Version by default. But I have setup an alias in .bash_profile
like so:
alias php7=/path/to/php7
and that is working fine. I would like to use DRUSHDrush, so I cloned the repo from githubrepository, such that I can use drushDrush with the phpPHP version from the alias like so:with php7 ./path/to/drush
.
php7 ./path/to/drush
But doingDoing so just prints the content of drush
toDrush to the terminal.
How can I setup an alias like the one for php7,PHP 7 that I canallows me to run
$drush
from anywhere on Drush with that serverPHP version?
UPDATE
I have added thosethese lines to mythe .bash_profile
.bash_profile file.
alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"
Results in:When I run drush pm-update drupal
, I get the following errors.
$drush --version
Drush Version : 8.1.7
$cd /drupal/root
$drush pm-update drupal
The external command could not be executed due to an application error.
[error]
The command could not be executed successfully (returned: PHP Parse error: syntax error, unexpected '[' in
[error]
phar:///path/to/drush.phar/includes/startup.inc on line 63, code: 255)
pm-updatestatus failed.
The external command could not be executed due to an application error.
The command could not be executed successfully
Returned: PHP Parse error: syntax error, unexpected '[' in phar:///path/to/drush.phar/includes/startup.inc on line 63, code: 255)
pm-updatestatus failed.
Any Idea? Why? How can I fix that?
UPDATE #2
$drush pm-updatestatus
Running drush pm-updatestatus
or
$drush cr
are running with no failures drush cr
works, and $drushdrush status
shows no errors ….
Is thatthere a certain version bug in a specific version?