Changeset 1090 in svn for trunk/htdocs/cacher/index.php


Ignore:
Timestamp:
2012-07-30T15:01:09Z (3 years ago)
Author:
Xuefer
Message:

diagnosis: impl some advises

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/cacher/index.php

    r1088 r1090  
    257257xcache_count(XC_TYPE_PHP); // trigger auth
    258258if (!extension_loaded('XCache')) {
    259     include "../common/header.tpl.php";
    260     echo '<h1>XCache is not loaded</h1>';
    261     ob_start();
    262     phpinfo(INFO_GENERAL);
    263     $info = ob_get_clean();
    264     if (preg_match_all("!<tr>[^<]*<td[^>]*>[^<]*(?:Configuration|ini|Server API)[^<]*</td>[^<]*<td[^>]*>[^<]*</td>[^<]*</tr>!s", $info, $m)) {
    265         echo '<div class="phpinfo">';
    266         echo 'PHP Info';
    267         echo '<table>';
    268         echo implode('', $m[0]);
    269         echo '</table>';
    270         echo '</div>';
    271     }
    272     if (preg_match('!<td class="v">(.*?\\.ini)!', $info, $m)) {
    273         echo "Please check $m[1]";
    274     }
    275     else if (preg_match('!Configuration File \\(php.ini\\) Path *</td><td class="v">([^<]+)!', $info, $m)) {
    276         echo "Please put a php.ini in $m[1] and load XCache extension";
    277     }
    278     else {
    279         echo "You don't even have a php.ini yet?";
    280     }
    281     echo "(See above)";
    282     include "../common/footer.tpl.php";
     259    header("Location: ../diagnosis");
    283260    exit;
    284261}
Note: See TracChangeset for help on using the changeset viewer.