0
votes

I've been stuck with this drush problem for more than a week now and I've tried google my way to solution but it seems like it's impossible.

The main problem is that I can't use drush for enabling my modules. That's where I'm stuck. Downloading works and everything but as soon as I try to enable a module it says:

all > drush en token Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command. [error] The drush command 'en token' 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.

This is what I get for 'drush status' (sitename and everything is correct): Drush was attempting to connect to: Drupal version : 7.38
Site URI : http://default
Database driver : mysql
Database hostname : 127.0.0.1
Database port :
Database username : jbdrush
Database name : jbdrush
PHP executable : /Applications/XAMPP/xamppfiles/bin/php-5.6.8
PHP configuration : /Applications/XAMPP/xamppfiles/etc/php.ini
PHP OS : Darwin
Drush script : /Users/username/.composer/vendor/drush/drush/drush.php Drush version : 7.0.0
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /Applications/XAMPP/xamppfiles/htdocs/jbdrush
Site path : sites/default

Could anyone please help me with this? I've tried multiple versions of drush and even to reinstall it like 10 times.

2

2 Answers

0
votes

There seems to be an issue with where you are running the drush command from. The error you indicated points to that you are probably running drush from outside a drupal site.

Thus if your drupal root is at

/Applications/XAMPP/xamppfiles/htdocs/jbdrush

Then you do need to execute drush from within there. If ever you are invoking drush from outside the drupal site folder, it will not be able to understand as to what site and modules you are requesting to install.

0
votes

I faced similar issue in my xampp installation. I found that mysql.exe was not in my system path.

Assuming xampp is installed in c:\xampp folder, try setting **c:\xampp\mysql\bin** folder in your system path. Then try the drush command - drush en token.