I am tring to get DRUSH (drush-master) up and running on a CentOS release 6.8 (Final) virtual server using PHP version 5.6.22. I will copy the php & DRUSH outputs below including the final error message:

Looking through the forums there is mention of the cause being an outdated version of PHP. However, I've checked the requirements and am pretty sure these versions should be compatible.

[server2 drush]# which drush
[server2 drush]# ls -lart /usr/bin/drush
lrwxrwxrwx 1 root root 35 Sep  2 16:05 /usr/bin/drush -> /usr/local/drush/drush-master/drush*
[server2 drush]# /usr/bin/php56 --version
PHP 5.6.22 (cli) (built: Jul  5 2016 15:31:36)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[server2 drush]# /usr/bin/php56 /usr/bin/drush

Parse error: syntax error, unexpected '[' in /usr/local/drush/drush-master/includes/preflight.inc on line 248

1 Answer 1


The syntax error you are seeing implies that you are actually running php 5.3. I can see that /usr/bin/php56 is version 5.6.22, but does $(which php) really point to /usr/bin/php56? Double-check your $PATH.

  • Thanks for your help Greg. $(which php) does indeed point to an older version of php but I am manually parsing DRUSH though the 5.6 binary as follows: /usr/bin/php56 /usr/bin/drush
    – Adam
    Commented Sep 8, 2016 at 9:25
  • I think you have to do DRUSH_PHP=/usr/bin/php56 /usr/bin/drush
    – hansfn
    Commented Sep 8, 2016 at 9:29

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.