0

I'm on the final two sites to migrate to D9 - but some D9 modules are now needing PHP 8.1 to stay on the latest upgrades. So - I've changed my server environment to use PHP 8.1 - and using XAMPP for Windows 11 - on PHP 8.1.6 - as per the Drupal.org PHP recommendation.

Only issue is - I'm now unable to use drush to update my remaining D7 sites. Has anybody got this to work on Windows 11 - using XAMPP or similar?

$   drush.php.bat ups
Command pm-updatestatus needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment [error]
to run this command.
The drush command 'ups' could not be executed.                                                                                          [error]

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ drush status
The filename, directory name, or volume label syntax is incorrect.

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ php -v
PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ drush.php.bat status
 PHP configuration      :  C:\xampp\php\php.ini
 PHP OS                 :  WINNT
 Drush script           :  C:/Users/perso/AppData/Roaming/Composer/vendor/bin/drush.php
 Drush version          :  8.4.12
 Drush temp directory   :  C:\Users\perso\AppData\Local\Temp
 Drush configuration    :
 Drush alias files      :


MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$   drush.php.bat ups
Command pm-updatestatus needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment [error]
to run this command.
The drush command 'ups' could not be executed.                                                                                          [error]

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ ls
favicon.ico  files/  modules/  settings.php  themes/

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ php -v
PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies

MINGW64 /c/xampp/apache/htdocs/drupal-7/sites/mysite.com
$ drush
The filename, directory name, or volume label syntax is incorrect.

7
  • Drush 8 should work on PHP 8.1.. Check the configuration-- it's possible that you are running Drush from one PHP, and the Drupal site from another. One way to fix issues like this permanently is to use a Docker-based tool like ddev or lando that gives you siloed containers per-site. Commented Apr 21, 2023 at 10:13
  • It is interesting to hear that XAMPP is still being used.
    – mona lisa
    Commented Apr 21, 2023 at 10:43
  • 1
    Drop XAMPP, it's yesteryear's technology. Get DDEV and you will get used to it really fast and never have to worry about this kind of stuff again, because DDEV simply comes with everything you need aboard. It also works nicely with D7.
    – leymannx
    Commented Apr 21, 2023 at 18:44
  • I haven’t used XAMPP since 2014 or 2015. You’re stuck in the Stone Age of local dev tech.
    – No Sssweat
    Commented Apr 21, 2023 at 21:04
  • I support the DDEV suggestions, but you could try to understand what is going on by adding the -vvv option.
    – hansfn
    Commented Apr 22, 2023 at 7:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.