I have been running drush successfully for more than a year. Now running some drush commands such as "drush pml" or "drush up" I suddenly get the well known error:
Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
The drush command 'pml' could not be executed. Drush was not able to start (bootstrap) the Drupal database.
Usually one gets this error when running drush command in a directory higher than to site's root directory. But in my case I am indeed inside de site's root directory and I still get the error. Besides I also have an .aliases.drushrc.php file which has been working all along and that drush actually takes into account drush st gives:
Drupal version : 7.23 Site URI : http://default Database driver : mysql Database hostname : localhost Database username : mydatabase_dru1 Database name : mydatabase_dru1 Default theme : garland Administration theme: garland PHP configuration : /Users/me/.drush/php.ini /Users/me/.drush/php.ini Drush version : 5.8 Drush configuration: Drush alias files : /Users/me/.drush/mysite.aliases.drushrc.php Drupal root : /Applications/XAMPP/xamppfiles/htdocs/kl-local Site path : sites/default Modules path : sites/all/modules Themes path : sites/all/themes File directory path: sites/default/files %paths : Array
The problem is also not due to running in a jailed shell because invoking mysql in a shell returns:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 736
Server version: 5.1.44 Source distribution
Also invoking drush sql-cli in a shell returns:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 735
Server version: 5.1.44 Source distribution
Also drush rsync and drush sql-sync do work! I can get my remote site synced to my local one.
One error I have noticed is that locally drush st returns the wrong theme names. it returns:
Default theme : garland
Administration theme : garland
instead of
Default theme : bootstrap_subtheme
Administration theme : seven
Also when I ssh to my remote rsynced sql-synced site then the version of drush installed on that remote site works normally.
Even odder, when I run my local drush version on both my local site and my remote (synced) site, drush works on the remote but not locally. for instance from my local machine:
drush @mysite.local up returns:
bash-3.2$ drush @mysite.local up drush @mysite.local up Command pm-update needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command. [error] Command pm-update needs the following modules installed/enabled to run: update. [error] The drush command 'up' could not be executed. [error] Drush was not able to start (bootstrap) the Drupal database. [error] Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.
Drush was attempting to connect to : Drupal version : 7.23 Site URI : http://default Database driver : mysql Database hostname : localhost Database username : mydatabase_dru1 Database name : mydatabase_dru1 Default theme : garland Administration theme: garland PHP configuration : /Users/me/.drush/php.ini /Users/me/.drush/php.ini Drush version : 5.3 Drush configuration: Drush alias files : /Users/me/.drush/mysite.aliases.drushrc.php Drupal root : /Applications/XAMPP/xamppfiles/htdocs/mysite-local Site path : sites/default Modules path : sites/all/modules Themes path : sites/all/themes File directory path: sites/default/files %paths You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or $options['uri'] in your drushrc.php file.
But drush @mysite.remote up (for my remote synced site) actually starts the update process.
I get the same behaviors whether I run drush 5.3 or drush 5.8 on os x10.8.5
One thing I am wondering is if the line:
PHP configuration : /Users/me/.drush/php.ini /Users/me/.drush/php.ini
does not indicate a problem somehow.
Also I have php 5.3.27 (cli) installed on my local system and XAMMP (which is serving my site) is using its own version 5.3.1 could that introduce some conflicts?
My remote server runs php 5.2.21
Any idea where the problem could be originated from?
drush cc drush
?