1

I have a Windows 10 PC, using git-bash as terminal window to run drush. Drush is installed in c:\users\myname\appdata\roaming\composer\vendor\drush\drush.

My apache server (using xampp) is on the d drive. When I am in d:/xampp/htdocs/ I can run drush in the terminal just fine (drush dl honeypot works perfectly). If I cd another level to d:/xampp/htdocs/dev1 and try to run drush I get this error:

Fatal error: Class 'Drupal\Core\Session\AccountInterface' not found in D:\xampp\htdocs\jbcg\core\includes\bootstrap.inc on line 58 Drush command terminated abnormally due to an unrecoverable error.
[error] Error: Class 'Drupal\Core\Session\AccountInterface' not found in D:\xampp\htdocs\jbcg\core\includes\bootstrap.inc, line 58 PHP Fatal error: Class 'Drupal\Core\Session\AccountInterface' not found in D:\xampp\htdocs\jbcg\core\includes\bootstrap.inc on line 58

If I cd back up a level to htdocs, I can execute the command just fine. Anyone have any idea what is going on?

Thanks, Jim

  • You claim that if you cd into d:/xampp/htdocs/dev1, then Drush tries (and fails) to bootstrap a site in D:\xampp\htdocs\jbcg. This does not really make sense. There's not enough info here to diagnose. You'll first need to figure out which Drupal root Drush is bootstrapping from htdocs; drush status will tell you this. Then, you need to figure out why a different Drupal root is being selected when you cd to a child folder. Check for $options['root'] in a drushrc.php file, site alias usage, etc.; also, run with --debug for more hints about what Drush is doing. – greg_1_anderson Mar 28 '16 at 0:18
  • Sorry, it is jdbg, not dev1. That was a typo. Here is the status: drush status $ drush status PHP executable : php PHP configuration : D:\xampp\php\php.ini PHP OS : WINNT Drush version : 6.0-rc4 Drush configuration : Drush alias files : C:\Users\james/.drush/d8.local.aliases.drushrc.php I need to upgrade to drush 8 I believe – user1130403 Mar 28 '16 at 0:29
  • Okay, upgraded to version 8 and it works. What I had done is git checkout 8.x-6.0 which I thought was version 8 but it was version 6. Installing with composer dev-master branch updated to version 8. My bad and thanks for the help. – user1130403 Mar 28 '16 at 0:39
  • Those branches were deleted a long time ago, but someone pushed them back up a while ago (on accident, no doubt). I recently deleted them all again. Sorry for the inconvenience. – greg_1_anderson Mar 28 '16 at 1:28

Your Answer

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

Browse other questions tagged or ask your own question.