7 if( isset( $_SERVER['REQUEST_URI'] ) ) {
8 $scriptUrl = $_SERVER['REQUEST_URI'];
9 } elseif( isset( $_SERVER['SCRIPT_NAME'] ) ) {
10 // Probably IIS; doesn't set REQUEST_URI
11 $scriptUrl = $_SERVER['SCRIPT_NAME'];
15 if ( preg_match( '!^(.*)/config/[^/]*.php$!', $scriptUrl, $m ) ) {
17 } elseif ( preg_match( '!^(.*)/[^/]*.php$!', $scriptUrl, $m ) ) {
20 $baseUrl = dirname( $baseUrl );
24 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25 <html xmlns
='http://www.w3.org/1999/xhtml' xml
:lang
='en' lang
='en'>
27 <title
>MediaWiki
<?php
echo htmlspecialchars( $wgVersion ); ?
></title
>
28 <meta http
-equiv
='Content-Type' content
='text/html; charset=utf-8' />
29 <style type
='text/css' media
='screen, projection'>
32 background
-color
: #fff;
33 font
-family
: sans
-serif
;
49 <img src
="<?php echo htmlspecialchars( $baseUrl ) ?>/skins/common/images/mediawiki.png" alt
='The MediaWiki logo' />
51 <h1
>MediaWiki
<?php
echo htmlspecialchars( $wgVersion ); ?
></h1
>
54 MediaWiki requires PHP
5.0.0 or higher
. You are running PHP
55 <?php
echo htmlspecialchars( phpversion() ); ?
>.
60 * Test the *.php5 extension
62 $downloadOther = true;
64 $testUrl = "$wgServer$baseUrl/extension-test.php5";
65 ini_set( 'allow_url_fopen', '1' );
66 $s = file_get_contents( $testUrl );
68 if ( strpos( $s, 'yes' ) !== false ) {
69 $encUrl = htmlspecialchars( str_replace( '.php', '.php5', $scriptUrl ) );
70 echo "<p>You may be able to use MediaWiki using a <a href=\"$encUrl\">.php5</a> file extension.</p>";
71 $downloadOther = false;
74 if ( $downloadOther ) {
76 <p
>Please consider upgrading your copy of PHP
. PHP
4 is at the end of its
77 lifecycle
and will not receive further security updates
.</p
>
78 <p
>If for some reason you really really need to run MediaWiki on PHP
4, you will need to
79 <a href
="http://www.mediawiki.org/wiki/Download">download version
1.6.x
</a
>
80 from our website
. </p
>