Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
removed tags from the title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Drush–alias Which alias do I use to run it with another phpPHP version?

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 drushtoDrush 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?

Drush–alias to run it with another php version

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

UPDATE #2

$drush pm-updatestatus

or $drush cr

are running with no failures, and $drush status shows no errors

Is that a certain version bug?

Which alias do I use to run it with another PHP version?

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 Drush, so I cloned the repository, such that I can use Drush with the PHP version from the alias with php7 ./path/to/drush.

Doing so just prints the content of Drush to the terminal.

How can I setup an alias for PHP 7 that allows me to run Drush with that PHP version?

I have added these lines to the .bash_profile file.

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

When I run drush pm-update drupal, I get the following errors.

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.

Why? How can I fix that?

Running drush pm-updatestatus or drush cr works, and drush status shows no errors.

Is there a bug in a specific version?

Mod Moved Comments To Chat
added 174 characters in body
Source Link
philipp
  • 211
  • 3
  • 13

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

UPDATE #2

$drush pm-updatestatus

or $drush cr

are running with no failures, and $drush status shows no errors …

Is that a certain version bug?

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

UPDATE #2

$drush pm-updatestatus

or $drush cr

are running with no failures, and $drush status shows no errors …

Is that a certain version bug?

added 673 characters in body
Source Link
philipp
  • 211
  • 3
  • 13

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

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 DRUSH, so cloned the repo from github, such that I can use drush with the php version from the alias like so:

php7 ./path/to/drush

But doing so just prints the content of drushto the terminal.

How can I setup an alias like the one for php7, that I can run

$drush

from anywhere on that server?

UPDATE

I have added those lines to my .bash_profile

alias php7=/path/to/php7
export DRUSH_PHP=/path/to/php7
alias drush="php7 $HOME/path/to/drush.phar"

Results in:

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

Any Idea? Why? How can I fix that?

Source Link
philipp
  • 211
  • 3
  • 13
Loading