Steps to replicate the issue (include links if applicable):
In the installation directory:
> sudo mkdir --mode=0777 importtest > sudo touch importtest/cutie.png > sudo chmod 0000 importtest/cutie.png > sudo -u http php maintenance/run.php importImages importtest PHP Warning: PHP Startup: ast: Unable to initialize module Module compiled with module API=20230831 PHP compiled with module API=20240924 These options need to match in Unknown on line 0 Importing Files Importing cutie.png...failed. (Could not store file "importtest/cutie.png" at "mwstore://local-backend/local-public/c/ce/Cutie.png".) Found: 1 Failed: 1 > echo $? 0
What happens?:
importImages.php exits with return code 0 even though a file failed to import
What should have happened instead?:
It should've returned a non-zero exit code (such as 1)
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
- MediaWiki: 1.43.0 (aebca8e) 06:24, 11 February 2025
- PHP: 8.4.4 (fpm-fcgi)
- MariaDB: 11.6.2-MariaDB