Manual:load.php
MediaWiki File: load.php | |
---|---|
Location: | / |
Source code: | master • 1.24.1 • 1.23.8 |
Classes: | None |
load.php is a script for the front-end to hook into for loading ResourceLoader modules.
Styles not displaying[edit | edit source]
After they updated to MediaWiki 1.18 or newer, many users had the problem that their wiki showed up without styles. CSS styles were not applied; what they saw instead looks like a trimmed down version. All styles are browser defaults; no special styles are applied.
Solution:
The problem in most cases is caused by the fact that requests to load.php are redirected to the MediaWiki main PHP file, which finally returns a MediaWiki page. The expected output however are CSS styles.
To fix the issue you have to add a RewriteRule in the file .htaccess. Change your .htaccess file to make sure that calls to load.php (and to api.php btw.) are not rewritten.
RewriteEngine On RewriteRule ^(api|load)\.php - [L] ...
After that load.php should return the right contents and your wiki should be styled.
Other possible problems: Manual:Errors and symptoms#The wiki appears without styles applied and images are missing
Details[edit | edit source]
First it checks the PHP version, which must be 5.3.2 or higher, and it includes WebStart.php. Next, it creates a ResourceLoader
object and calls its respond()
method, which outputs the specified resource content, including a content-type header.
A custom value for the location of the load.php script can be provided using $wgLoadScript
.