We run a Mediawiki installation on Ubuntu 22, x86_64, fully patched. We are trying to upgrade from Mediawiki 1.37.3 to 1.38.2. All prereq steps seem to go Ok. We unpack the tarball in `/tmp`, then rsync it to `/varwww/html/w` We then run Composer to update components, and it is Ok.
When we try to run `maintenance/update.php`, it results in:
```
/var/www/html/w# php /var/www/html/w/maintenance/update.php --quick
PHP Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/html/w/includes/Setup.php:237
Stack trace:
#0 /var/www/html/w/maintenance/doMaintenance.php(96): require_once()
#1 /var/www/html/w/maintenance/update.php(264): require_once('/var/www/html/w...')
#2 {main}
thrown in /var/www/html/w/includes/Setup.php on line 237
Fatal error: Uncaught FatalError: $wgBaseDirectory must not be modified in settings files! Use the MW_INSTALL_PATH environment variable to override the installation root directory. in /var/www/html/w/includes/Setup.php:237
Stack trace:
#0 /var/www/html/w/maintenance/doMaintenance.php(96): require_once()
#1 /var/www/html/w/maintenance/update.php(264): require_once('/var/www/html/w...')
#2 {main}
thrown in /var/www/html/w/includes/Setup.php on line 237
```
These problems are coming from the files distributed in the Mediawiki 1.38.2 tarball. We are not setting anything in our `LocalSettings.php`:
```
# grep wgBaseDirectory LocalSettings.php
# grep MW_INSTALL_PATH LocalSettings.php
# grep Setup.php LocalSettings.php
```
For completeness, we do use `$IP` in our `LocalSettings.php`. Otherwise things break earlier in the `update.php` process:
```
# grep IP LocalSettings.php
$wgStyleDirectory = "$IP/skins";
$wgExtensionDirectory = "$IP/extensions";
$wgUploadDirectory = "$IP/images";
```