Commit: 5c0721b72a29514ce9406e4fb3a441d07f4ad0c6 Author: Sara Golemon <[email protected]> Tue, 18 Jun 2019 01:36:12 -0400 Parents: 1307985c234199fadf5b820e26d8aa045f5fb64b Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=5c0721b72a29514ce9406e4fb3a441d07f4ad0c6 Log: Remove self-test logic from mirror-info.php Technically, we could kill this whole file since the mirror program has been discontinued. However, the info is still probably useful to anyone PRing against web-php. Changed paths: M mirror-info.php Diff: diff --git a/mirror-info.php b/mirror-info.php index 1bb68bd..a428122 100644 --- a/mirror-info.php +++ b/mirror-info.php @@ -31,21 +31,6 @@ $sqlite = get_available_sqlites(); $exts = join(get_loaded_extensions(), ','); -if (isset($_GET["token"]) && md5($_GET["token"]) === "19a3ec370affe2d899755f005e5cd90e") { - $retval = run_self_tests(); - $output = isset($_GET["output"]) ? $_GET["output"] : "php"; - switch($output) { - case "human": - var_dump($retval); - break; - - case "php": - default: - echo serialize($retval); - } - exit(0); -} - echo join('|', array( $MYSITE, // 0 : CNAME for mirror as accessed (CC, CC1, etc.) phpversion(), // 1 : PHP version overview @@ -60,59 +45,3 @@ echo join('|', array( $_SERVER['SERVER_ADDR'], // 10: The IP address under which we're running )); -function run_self_tests() { - global $MYSITE; - global $LAST_UPDATED, $sqlite, $mirror_stats, $hash_ok; - - //$MYSITE = "http://sg.php.net/"; - $content = fetch_contents($MYSITE . "manual/noalias.txt"); - if (is_array($content) || trim($content) !== 'manual-noalias') { - return array( - "name" => "Apache manual alias", - "see" => $MYSITE . "mirroring-troubles.php#manual-redirect", - "got" => $content, - ); - } - - $ctype = fetch_header($MYSITE . "manual/en/faq.html.php", "content-type"); - if (strpos($ctype, "text/html") === false) { - return array( - "name" => "Header weirdness. Pages named '.html.php' are returning wrong status headers", - "see" => $MYSITE . "mirroring-troubles.php#content-type", - "got" => var_export($ctype, true), - ); - } - - $ctype = fetch_header($MYSITE . "functions", "content-type"); - if (is_array($ctype)) { - $ctype = current($ctype); - } - if (strpos($ctype, "text/html") === false) { - return array( - "name" => "MultiViews on", - "see" => $MYSITE . "mirroring-troubles.php#multiviews", - "got" => var_export($ctype, true), - ); - } - - $header = fetch_header($MYSITE . "manual/en/ref.var.php", 0); - list($ver, $status, $msg) = explode(" ", $header, 3); - if($status != 200) { - return array( - "name" => "Var Handler", - "see" => $MYSITE . "mirroring-troubles.php#var", - "got" => var_export($header, true), - ); - } - - return array( - "servername" => $MYSITE, - "version" => phpversion(), - "updated" => $LAST_UPDATED, - "sqlite" => $sqlite, - "stats" => $mirror_stats, - "language" => default_language(), - "rsync" => $hash_ok, - ); - -} -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
