summaryrefslogtreecommitdiff
path: root/docs/scripts.txt
blob: 178bb157bbe6cd15d904853f2aac46e3ef37615b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
scripts.txt

MediaWiki primary scripts are in the root directory of the software. Users
should only use these scripts to access the wiki. There are also some .php that
aren't primary scripts but helper files and won't work if they are accessed
directly by the web.

Primary scripts:

  index.php
    Main access point. It handles the most of requests.
    See https://www.mediawiki.org/wiki/Manual:Index.php

  api.php
    Script to provide an API for bots to fetch content and informations about
    the site and also modify it. See https://www.mediawiki.org/wiki/API
    for more informations.

  img_auth.php
    Script that only serve images to logged in users. To configure the wiki
    to use that script, see https://www.mediawiki.org/wiki/Manual:Image_Authorisation.

  load.php
    Used by ResourceLoader to serve minified, concatenated and gzipped CSS and JS.

  opensearch_desc.php
    Returns a OpenSearch description document (see http://www.opensearch.org/)
    that points to the search engines of the wiki.

  profileinfo.php
    Allow users to see the profiling information that are stored in the
    database.

    To save the profiling information in the database (required to use this
    script), you have to modify StartProfiler.php to use the Profiler class and
    not the stub profiler which is enabled by default.
    You will also need to set $wgProfiler['output'] to 'db' in LocalSettings.php
    to force the profiler to save the informations in the database and apply the
    maintenance/archives/patch-profiling.sql patch to the database.

    To enable the profileinfo.php itself, you'll need to set $wgDBadminuser
    and $wgDBadminpassword in your LocalSettings.php, as well as $wgEnableProfileInfo 
    See also https://www.mediawiki.org/wiki/Manual:Profiling .

  thumb.php
    Script used to resize images if it is configured to be done when the web
    browser requests the image and not when generating the page. This script can
    be used as a 404 handler to generate image thumbs when they don't exist.

There is also a file with a .php5 extension for each script. They can be used if
the web server needs a .php5 to run the file with the PHP 5 engine and runs .php
scripts with PHP 4. To use these files, you have to modify $wgScriptExtension to
'.php5' is LocalSettings.php but it is already done by the config script if you
used mw-config/index.php5 for installation.