0

After ugrading PHP 5.3 to 5.4.10, drush fails with the following error for most of commands: Command watchdog-show needs a higher bootstrap level to run - you will need to invoke drush from a more [error] functional Drupal environment to run this command ...

I reinstalled Drush(Drush 5.8 does not work on Mac OSx 10.7.5, so downgraded to 5.0.0), but it did not solve the problem.

Is Drush compatible with php 5.4.10.? Why would i get these errors and how to troubleshoot?

Thank You

3

As mentioned here drush is not yet completely compatible with PHP 5.4

And regarding the error message you will need to invoke drush from a more [error] functional Drupal environment to run this command , in general cases it means that you are running drush from a location which is not associate to a drupal instance. To be on a safer side go location-of-your-drupal-instance/sites/all/modules and run the command.

  • 1
    It might also indicate a problem with the settings.php file; it might be missing, have incorrect permissions, etc. – Clive Dec 28 '12 at 13:01
  • Thank You Gokul N K... the bug seem to be fixed from the comments. How would i configure Drush to use other PHP version sitting another folder? – latvian Dec 29 '12 at 18:57
  • Thank You Clive....i seem to be missing settings.php before and after the upgrade. Where do i get copy or default settings.php? I am using drupal 7.18 and 7.17 – latvian Dec 29 '12 at 19:00
  • 1
    Clive..i was wrong. there is settings.php – latvian Dec 30 '12 at 22:53
1

I was able solve the problem:

What helped me was turn drush into debug mode by adding flag '--debug'

That showed me that pdo extensions were not loaded

It end up that my new PHP5.4 upgrade compiled from source had issues. Reinstalled PHP 5.4 this time with macports as described in https://gist.github.com/2721719

Afterwards, to make sure php-cli is pointing to the new php.ini run 'php -i | grep php.ini'. This is important because drush uses the php-cli configurations that may point to old php.ini

To make sure all of the extensions are loading properly run 'php -v' which will show issues if there is any before displaying the actual version that you can also validate if your upgrade is inline with php-cli

At last, to make drush work with my new PHP 5.4 upgrade, i needed to remove drush and install again. Drush 5.8 works fine with PHP 5.4 so far. However, I needed to create a symbolic link to make it work. It was looking for drush.php in the wrong directory. Used 'locate drush.php' to find the right drush.php link to.

I hope this is helpful. Thanks to community with so much info out there

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.