MediaWiki  1.23.2
PHPVersionError.php
Go to the documentation of this file.
1 <?php
40 function wfPHPVersionError( $type ) {
41  $mwVersion = '1.23';
42  $minimumVersionPHP = '5.3.2';
43 
44  $phpVersion = phpversion();
45  $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
46  $message = "MediaWiki $mwVersion requires at least PHP version $minimumVersionPHP, you are using PHP $phpVersion.";
47  if ( $type == 'cli' ) {
48  $finalOutput = "You are using PHP version $phpVersion but MediaWiki $mwVersion needs PHP $minimumVersionPHP or higher. ABORTING.\n" .
49  "Check if you have a newer php executable with a different name, such as php5.\n";
50  } elseif ( $type == 'index.php' ) {
51  $pathinfo = pathinfo( $_SERVER['SCRIPT_NAME'] );
52  $encLogo = htmlspecialchars(
53  str_replace( '//', '/', $pathinfo['dirname'] . '/' ) .
54  'skins/common/images/mediawiki.png'
55  );
56 
57  header( "$protocol 500 MediaWiki configuration Error" );
58  header( 'Content-type: text/html; charset=UTF-8' );
59  // Don't cache error pages! They cause no end of trouble...
60  header( 'Cache-control: none' );
61  header( 'Pragma: no-cache' );
62 
63  $finalOutput = <<<HTML
64 <!DOCTYPE html>
65 <html lang="en" dir="ltr">
66  <head>
67  <meta charset="UTF-8" />
68  <title>MediaWiki {$mwVersion}</title>
69  <style media='screen'>
70  body {
71  color: #000;
72  background-color: #fff;
73  font-family: sans-serif;
74  padding: 2em;
75  text-align: center;
76  }
77  p, img, h1 {
78  text-align: left;
79  margin: 0.5em 0;
80  }
81  h1 {
82  font-size: 120%;
83  }
84  </style>
85  </head>
86  <body>
87  <img src="{$encLogo}" alt='The MediaWiki logo' />
88  <h1>MediaWiki {$mwVersion} internal error</h1>
89  <div class='error'>
90  <p>
91  {$message}
92  </p>
93  <p>
94  Please consider <a href="http://www.php.net/downloads.php">upgrading your copy of PHP</a>.
95  PHP versions less than 5.3.0 are no longer supported by the PHP Group and will not receive
96  security or bugfix updates.
97  </p>
98  <p>
99  If for some reason you are unable to upgrade your PHP version, you will need to
100  <a href="https://www.mediawiki.org/wiki/Download">download</a> an older version
101  of MediaWiki from our website. See our
102  <a href="https://www.mediawiki.org/wiki/Compatibility#PHP">compatibility page</a>
103  for details of which versions are compatible with prior versions of PHP.
104  </p>
105  </div>
106  </body>
107 </html>
108 HTML;
109  // Handle everything that's not index.php
110  } else {
111  // So nothing thinks this is JS or CSS
112  $finalOutput = ( $type == 'load.php' ) ? "/* $message */" : $message;
113  header( "$protocol 500 MediaWiki configuration Error" );
114  }
115  echo "$finalOutput\n";
116  die( 1 );
117 }
of
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
Definition: globals.txt:10
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
PHP
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types as usual *javascript user provided javascript code *css user provided css code *text plain text In PHP
Definition: contenthandler.txt:5
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
wfPHPVersionError
wfPHPVersionError( $type)
Display something vaguely comprehensible in the event of a totally unrecoverable error.
Definition: PHPVersionError.php:40
Makefile.download
def download(url, dest)
Definition: Makefile.py:40
title
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
Definition: All_system_messages.txt:2703
updates
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these updates(as a Java servelet could)
MediaWiki
version
Prior to version
Definition: maintenance.txt:1
will
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will
Definition: All_system_messages.txt:914
some
I won t presume to tell you how to I m just describing the methods I chose to use for myself If you do choose to follow these it will probably be easier for you to collaborate with others on the but if you want to contribute without by all means do which work well I also use K &R brace matching style I know that s a religious issue for some
Definition: design.txt:79
are
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are
Definition: contenthandler.txt:5
color
in the sidebar</td >< td > font color
Definition: All_system_messages.txt:425
from
Please log in again after you receive it</td >< td > s a saved copy from
Definition: All_system_messages.txt:3297
href
shown</td >< td > a href
Definition: All_system_messages.txt:2674
page
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk page
Definition: hooks.txt:1956
$type
$type
Definition: testCompression.php:46