Drush 8x working from directories above web root, but not in web root I need some help trouble shooting Drush. I'm on a shared server, Hostgator, running Linux and PHP 5.6.3. 

My install looks something like home/public_html/websites/MyDrupal

I have installed Composer globally as well as Drush
.bashrc includes: 

# .bashrc
export PATH=$PATH:~/.composer/vendor/drush/drush
[ -z "$PS1" ] &amp;&amp; return

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions
alias composer="/usr/bin/php-cli ~/bin/composer.phar"
alias drush="~/.composer/vendor/drush/drush/drush"


Composer runs from any directory within my host space. 

Drush will run, using the directory hierarchy example above, from 'home', 'public_html' and 'websites' but if I run drush status within 'MyDrupal' I get an error: 

Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: syntax error, unexpected 'finally' (T_STRING), expecting catch
(T_CATCH) in
/.../public_html/bhsu/vendor/symfony/dependency-injection/ContainerBuilder.php,
line 452

Parse error: syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /.../public_html/bhsu/vendor/symfony/dependency-injection/ContainerBuilder.php on line 452


Would appreciate pointers... thanks
Fixed: we figured out that composer and drush were using an older version of PHP which wouldn't work w/ Drupal 8. I still don't understand how the webserver can run one version (phpinfo.php showed the site running the expected 5.6 version) while Drush is set to another. Anyway, finding and aliasing to the proper version fixed the issue. The fix was adding this to .bashrc: (your path might be different). 
    alias php='/opt/php56/bin/php'
    alias composer='/opt/php56/bin/php ~/bin/composer'
    export DRUSH_PHP='/opt/php56/bin/php'