Merge "DatabaseMssql: Don't duplicate body of makeList()"
[mediawiki.git] / index.php
blobc32bd3aba251149420ac1e1bb57101122e5ea4f9
1 <?php
2 /**
3 * This is the main web entry point for MediaWiki.
5 * If you are reading this in your web browser, your server is probably
6 * not configured correctly to run PHP applications!
8 * See the README, INSTALL, and UPGRADE files for basic setup instructions
9 * and pointers to the online documentation.
11 * https://www.mediawiki.org/
13 * ----------
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 * http://www.gnu.org/copyleft/gpl.html
30 * @file
33 # Bail on old versions of PHP. Pretty much every other file in the codebase
34 # has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in
35 # PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and
36 # 5.1, respectively.
37 if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) {
38 // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
39 require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
40 wfPHPVersionError( 'index.php' );
43 require __DIR__ . '/includes/WebStart.php';
45 $mediaWiki = new MediaWiki();
46 $mediaWiki->run();