0

In Xampp 2 Drupal sites are there.one is drupal 7.0 and another one is drupal 8.8.7. Drush version is 8.3.5, PHP version is 7.2.22 ,composer 1.9.2

When I try enabling module in Drupal 7.0

drush en serialization

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

  • connect to the database through a cli command using the --defaults-extra-file parameter to pass credentials through a tmp file. This method can break if other credentials are specified in a ~/.my.cnf file in your home directory. You may have to delete or rename the ~/.my.cnf file in your home directory.

    Drush was attempting to connect to:
    Drupal version         :  7.0
    Site URI               :  http://default
    Database driver        :  mysql
    Database hostname      :  localhost
    Database port          :
    Database username      :  root
    Database name          :  drupal7
    PHP configuration      :  C:\xampp\php\php.ini
    Drush script           :  C:/Users/moonraft/AppData/Roaming/Composer/vendor/drush/drus
                              h/drush.php
    Drush version          :  8.3.5
    Drush temp directory   :  C:\Users\moonraft\AppData\Local\Temp
    Drush configuration    :
    Drush alias files      :
    Drupal root            :  D:\xampp\htdocs\drupal7
    Drupal Settings File   :  sites/default/settings.php
    Site path              :  sites/default
    

Then if I try in Drupal 8.8.7

drush en serialization

Could not load SQL class. There is a mismatch between your Drupal root and your PHP [error]autoloading. This can happen if you mix Drupal 8 and Drupal 7. [error]Please check that the location of Drush matches the Drupal core version you want Drush to [error]talk to. Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush [error]from a more functional Drupal environment to run this command. The drush command 'en serialization' could not be executed. [error]Could not load SQL class. There is a mismatch between your Drupal root and [error] your PHP autoloading. This can happen if you mix Drupal 8 and Drupal 7. [error] Please check that the location of Drush matches the Drupal core version you [error] want Drush to talk to. 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.

  • connect to the database through a cli command using the --defaults-extra-file parameter to pass credentials through a tmp file. This method can break if other credentials are specified in a ~/.my.cnf file in your home directory. You may have to delete or rename the ~/.my.cnf file in your home directory.

    Drush was attempting to connect to:
    Drupal version         :  8.8.7
    Site URI               :  http://default
    PHP configuration      :  C:\xampp\php\php.ini
    PHP OS                 :  WINNT
    Drush script           :  C:/Users/moonraft/AppData/Roaming/Composer/vendor/drush/drus
                             h/drush.php
    Drush version          :  8.3.5
    Drush temp directory   :  C:\Users\moonraft\AppData\Local\Temp
    Drush configuration    :
    Drush alias files      :
    Drupal root            :  D:\xampp\htdocs\drupal8
    Drupal Settings File   :  sites/default/settings.php
    Site path              :  sites/default
    Sync config path       :  D:\xampp\htdocs\drupal8/content/sync
    

I am not sure what is the problem. Please help me with this. Thanks in advance

  • 1
    Stop using XAMPP, use DDEV instead (requires Docker). Then you ddev exec drush en serialization. Alternatively look a bit around, for example drupal.org/node/594744. This has been asked on the internet many times before. – leymannx Jul 9 at 11:51
  • @leymannx but the problem with ddev or docker based applications is they can not run on nested virtualization technologies like Amazon workspace, Citrix workspace etc.., – miststudent2011 Jul 9 at 17:36
  • If you have any insight on how to use them on nested virtualization can you please share it ? – miststudent2011 Jul 9 at 17:37
  • 1
    @miststudent2011, buy a Linux workspace. – 4k4 Jul 9 at 18:37
  • 1
    @miststudent2011 – I'd probably quit my job if I'd be forced to work with such a workspace. OS of my choice with admin rights is always part of the negotiation. – leymannx Jul 9 at 18:56

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.