+
+/**
+ * Display an error for a PHP extension not existing.
+ *
+ * @param string $type See wfGenericError
+ * @param string $mwVersion See wfGenericError
+ * @param array $missingExts The extensions we're missing
+ */
+function wfMissingExtensions( $type, $mwVersion, $missingExts ) {
+ $shortText = "Installing some PHP extensions is required.";
+
+ $missingExtText = '';
+ $missingExtHtml = '';
+ $baseUrl = 'https://secure.php.net';
+ foreach ( $missingExts as $ext ) {
+ $missingExtText .= " * $ext <$baseUrl/$ext>\n";
+ $missingExtHtml .= "<li><b>$ext</b> "
+ . "(<a href=\"$baseUrl/$ext\">more information</a>)</li>";
+ }
+
+ $cliText = "Error: Missing one or more required components of PHP.\n"
+ . "You are missing a required extension to PHP that MediaWiki needs.\n"
+ . "Please install:\n" . $missingExtText;
+
+ $longHtml = <<<HTML
+ You are missing a required extension to PHP that MediaWiki
+ requires to run. Please install:
+ <ul>
+ $missingExtHtml
+ </ul>
+HTML;
+
+ wfGenericError( $type, $mwVersion, 'Required components', $shortText,
+ $cliText, $longHtml );
+}