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.