print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>)\n\t\tappears to be invalid or is not writable. PHP needs to be able to save data to\n\t\tthis location for correct session operation.</li>";
}
# Check for PCRE support
if (!function_exists('preg_match')) {
    dieout("The PCRE support module appears to be missing. MediaWiki requires the\n\tPerl-compatible regular expression functions.");
}
# The installer can take a while, and we really don't want it to time out
wfSuppressWarnings();
set_time_limit(0);
wfRestoreWarnings();
$memlimit = ini_get("memory_limit");
if ($memlimit == -1) {
    print "<li>PHP is configured with no <tt>memory_limit</tt>.</li>\n";
} else {
    print "<li>PHP's <tt>memory_limit</tt> is " . htmlspecialchars($memlimit) . " bytes. ";
    $newlimit = wfMemoryLimit();
    $memlimit = wfShorthandToInteger($memlimit);
    if ($newlimit < $memlimit) {
        print "<b>Failed raising limit, installation may fail.</b>";
    } elseif ($newlimit > $memlimit) {
        print "Raised <tt>memory_limit</tt> to " . htmlspecialchars($newlimit) . " bytes. ";
    }
    print "</li>\n";
}
$conf->xcache = function_exists('xcache_get');
if ($conf->xcache) {
    print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
}
$conf->apc = function_exists('apc_fetch');
if ($conf->apc) {
    print "<li><a href=\"http://www.php.net/apc\">APC</a> installed</li>\n";
示例#2
0
}
// We don't use counters anymore. Left here for extensions still
// expecting this to exist. Should be removed sometime 1.26 or later.
if (!isset($wgDisableCounters)) {
    $wgDisableCounters = true;
}
if ($wgMainWANCache === false) {
    // Setup a WAN cache from $wgMainCacheType with no relayer.
    // Sites using multiple datacenters can configure a relayer.
    $wgMainWANCache = 'mediawiki-main-default';
    $wgWANObjectCaches[$wgMainWANCache] = ['class' => 'WANObjectCache', 'cacheId' => $wgMainCacheType, 'channels' => ['purge' => 'wancache-main-default-purge']];
}
Profiler::instance()->scopedProfileOut($ps_default2);
$ps_misc = Profiler::instance()->scopedProfileIn($fname . '-misc1');
// Raise the memory limit if it's too low
wfMemoryLimit();
/**
 * Set up the timezone, suppressing the pseudo-security warning in PHP 5.1+
 * that happens whenever you use a date function without the timezone being
 * explicitly set. Inspired by phpMyAdmin's treatment of the problem.
 */
if (is_null($wgLocaltimezone)) {
    MediaWiki\suppressWarnings();
    $wgLocaltimezone = date_default_timezone_get();
    MediaWiki\restoreWarnings();
}
date_default_timezone_set($wgLocaltimezone);
if (is_null($wgLocalTZoffset)) {
    $wgLocalTZoffset = date('Z') / 60;
}
// The part after the System| is ignored, but rest of MW fills it