I have installed Drush on a Mac and can use it to download modules for the drupal projects I have in XAMPP. However serveral drush commands like drush up
give a needs a higher bootstrap level to run
error message. How do I get around this issue?
Pauls-iMac:mysite Trotter$ drush up
Command pm-update needs a higher bootstrap level to run - you will [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'up' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This may occur when Drush is trying to:
* bootstrap a site that has not been installed or does not have a
configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri
parameter on the command line. See `drush topic docs-aliases` for
details.
* connect the database through a socket. The socket file may be
wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.
Drush was attempting to connect to:
Drupal version : 7.38
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database port :
Database username : root
Database name : mysite
PHP executable : /usr/bin/php
PHP configuration :
PHP OS : Darwin
Drush script : /Users/Trotter/.composer/vendor/drush/dru
sh/drush.php
Drush version : 7.0.0
Drush temp : /tmp
directory
Drush configuration :
Drush alias files :
Drupal root : /applications/xampp/xamppfiles/htdocs/mysite
Site path : sites/default
The drupal sites work fine, just not with Drush. I have tried forcing 127.0.0.1 instead of localhost.
I notice that my issue is very similar to MAC -> Drush higher bootstrap level?. The answer supplied by ChristophWeber sounds promising, but does not include enough information more me to be able to try it. For example I cannot find my .bashrc file which I gather should be in my home directory, and if I needed to create it myself I'm not sure what should be in it.
export PATH="~/.composer/vendor/bin:$PATH"
which php
. If it's not pointing to your XAMPP's bin directory, then in your .bash_profile file add:PATH=/Applications/XAMPP/xamppfiles/bin:$PATH
then typesource ~/.bash_profile && which php
in your terminal. If it's pointing to XAMPP's bin folder then your php is now set to XAMPP's one./applications/xampp
should really be/Applications/XAMPP
. Is this coming from your aliases file or did you manually change this to hide the real path of your site?