Steps to replicate the issue (include links if applicable):
- Install MediaWiki outside the document root
- Have a /w/rest.php wrapper file in the document root with require '/path/to/rest.php';
- Navigate to /w/rest.php
What happens?:
The response is:
{"message":"Error: exception of type MediaWiki\\Rest\\PathTemplateMatcher\\ModuleConfigurationException","reqId":"085ee9048dd6c7c3b7413ea2","httpCode":500,"httpReason":"Internal Server Error"}In the error logs:
PHP Warning: file_get_contents(includes/Rest/coreRoutes.json): Failed to open stream: No such file or directory in /workspace/mediawiki/core/includes/Rest/Module/Module.php on line 522
What should have happened instead?:
It should have worked. The correct base path for MediaWiki source files is MW_INSTALL_PATH, not the working directory.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
- 1.46.0-alpha (d2091a9)