Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush 8.1.15 failing with error on fresh Drupal 8 install #3219

Closed
toddvogel opened this issue Dec 7, 2017 · 5 comments
Closed

Drush 8.1.15 failing with error on fresh Drupal 8 install #3219

toddvogel opened this issue Dec 7, 2017 · 5 comments

Comments

@toddvogel
Copy link

Friends, I would appreciate some assistance.

I am on a shared hosting running Linux. I have installed globally Composer and Drush and then Drupal 8. Composer works from all directories and so does Drush. Drush runs from my Drupal install directory until I actually install the database and get a settings.php file.

Which is to say, I used Drush to install a fresh drupal site. Next I go into that new directory and run drush status. Drush runs and gives me the report on the site, stating there's no settings.php file (because I have not yet set up the database, etc). After setting up and running the Drupal installer from a browser I go back to the directory via the command line and run Drush Status and get the following:

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

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

I am running php 5.6, and switched to 7.1.3 to see if that was an issue, it was not.

I've set up Composer/drush for two other sites and they work fine. The difference is mainly this is Drupal 8
Thanks much

@toddvogel
Copy link
Author

If I remove the settings.php file Drush status report works without error (but I have no site...)

@greg-1-anderson
Copy link
Member

Run drush status from a global location without your site. Double-check what version of php Drush reports you are running. From the symptoms, it looks like you are running an older php-cli than you think you are.

@toddvogel
Copy link
Author

Thank you -
drush status:
bishopultras@bishopultras.com [~]# drush status
PHP executable : /usr/bin/php-cli
PHP configuration : /opt/php54/lib/php.ini
PHP OS : Linux
Drush script : /home3/bishopultras/.composer/vendor/drush/drush/dru
sh.php
Drush version : 8.1.15
Drush temp directory : /tmp
Drush configuration :
Drush alias files :

But phpinfo.php reports 7.1.3

@greg-1-anderson
Copy link
Member

Your website is using PHP 7.1.3, but the php that is in your $PATH is 5.4, which is not supported for your version of Drupal.

@toddvogel
Copy link
Author

Thanks Greg-1-anderson. I didn't even know that was possible, rather new to this. Will investigate further. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants