Monday 9 November 2015

Command needs a higher bootstrap level to run in drush

drush icon

This was the error I faced sometimes ago it happened when when I was trying to change my drupal theme with  drush. Everything was running on xampp environment and window 7 machine
Here is the full error report.
Command pm-info needs a higher bootstrap level to run - you will need    [error]

to invoke drush from a more functional Drupal environment to run this
command.
The drush command 'pmi' 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        :  8.0-dev
 Site URI              :  http://default
 Database driver       :  mysql
 Database username     :  root
 Database name         :  drupal
 PHP executable        :  php.exe
 PHP configuration     :  H:\xampp\php\php.ini
 PHP OS                :  WINNT
 Drush version         :  8.0
 Drush temp            :  C:\Temp
 directory
 Drush configuration   :
 Drush alias files     :
 Drupal root           :  H:/xampp/htdocs/drupal
 Site path             :  sites/default
 Active config path    :  sites/default/files/config_MoeSD5C7JSguok
                          xrBh4-UuwT_r9_jk2Z59QKdN-j9Zx9DIgHBy2dH8n
                          1rGOeKNJpaAAxBi4PzA/active
So this error is occurring because drush is unable to detect and make use of mysql database. So the question is how do i make the connection to my database and to solve command needs  a higher bootstrap level to run. The solution is to declare a mysql path to environmental variables. Eg. c:\xampp\mysql\bin
From the example above, am using xamp so your directory may be different.


No comments:

Post a Comment