Removed PATH_INFO check
authorAlexander Ebert <ebert@woltlab.com>
Tue, 21 Oct 2014 19:46:37 +0000 (21:46 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 21 Oct 2014 19:46:37 +0000 (21:46 +0200)
wcfsetup/test.php

index bfe3ab118b9e238bed6730c597c469048022df31..29294fdaad3c9af5d0b45078b26bb9ec6b801b15 100644 (file)
@@ -1,45 +1,7 @@
-<?php
-if (isset($_SERVER['PATH_INFO']) || isset($_SERVER['ORIG_PATH_INFO'])) {
-       $pathInfo = null;
-       if (isset($_SERVER['PATH_INFO'])) {
-               $pathInfo = $_SERVER['PATH_INFO'];
-       }
-       else if (isset($_SERVER['ORIG_PATH_INFO'])) {
-               $pathInfo = $_SERVER['ORIG_PATH_INFO'];
-                       
-               // in some configurations ORIG_PATH_INFO contains the path to the file
-               // if the intended PATH_INFO component is empty
-               if (!empty($pathInfo)) {
-                       if (isset($_SERVER['SCRIPT_NAME']) && ($pathInfo == $_SERVER['SCRIPT_NAME'])) {
-                               $pathInfo = '';
-                       }
-                               
-                       if (isset($_SERVER['PHP_SELF']) && ($pathInfo == $_SERVER['PHP_SELF'])) {
-                               $pathInfo = '';
-                       }
-                               
-                       if (isset($_SERVER['SCRIPT_URL']) && ($pathInfo == $_SERVER['SCRIPT_URL'])) {
-                               $pathInfo = '';
-                       }
-               }
-       }
-       
-       if (!empty($pathInfo)) {
-               if ($pathInfo == '/test/') {
-                       echo "PASSED";
-               }
-               else {
-                       @header("HTTP/1.0 500 Internal Server Error");
-                       echo "FAILED";
-               }
-               
-               exit;
-       }
-}
-?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-       <title>WoltLab Community Framework 2.0 System Requirements</title>
+       <title>WoltLab Community Framework 2.1 System Requirements</title>
 </head>
 <body>
 <?php
@@ -139,51 +101,10 @@ else if ((is_array($configArray) && !empty($configArray['safe_mode']['local_valu
 
 // everything is fine
 else {
-       // check for broken nginx setups
-       $isNginx = false;
-       if (isset($_SERVER['SERVER_SOFTWARE']) && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
-               $isNginx = true;
-       }
-       $isNginx = true;
-       if ($isNginx) { ?>
-               <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
-               <script>
-                       $(function() {
-                               $.ajax('test.php/test/', {
-                                       dataType: 'html',
-                                       error: function() {
-                                               $('#worker').remove();
-                                               $('#nginxFailure').show();
-                                       },
-                                       success: function() {
-                                               if (arguments[0] == 'PASSED') {
-                                                       $('#worker').remove();
-                                                       $('#nginx').show();
-                                               }
-                                               else {
-                                                       $('#worker').remove();
-                                                       $('#nginxFailure').show();
-                                               }
-                                       }
-                               });
-                       });
-               </script>
-               <p id="worker">Please wait &hellip;<br />Bitte warten &hellip;</p>
-               <p id="nginxFailure" style="color:red; display: none;">
-                       You are running nginx, but your current configuration prevents a successful installation. Please fix the PATH_INFO support for PHP, guides can be found <a href="https://www.google.de/search?q=nginx+php+path_info" target="_blank">here</a>. If you're on a hosted solution, please ask your hosting company to fix their configuration.<br />
-                       <br />
-                       Sie verwenden nginx als Webserver, jedoch verhindert die aktuelle Konfiguration eine erfolgreiche Installation. Bitte aktivieren Sie die PATH_INFO-Unterst&uuml;zung f&uuml;r PHP, Anleitungen sind <a href="https://www.google.de/search?q=nginx+php+path_info" target="_blank">hier</a> verf&uuml;gbar. Sollten Sie nur einen Webspace gemietet haben, so wenden Sie sich bitte an Ihren Anbieter, damit dieser die fehlerhafte Konfiguration korrigiert.
-               </p>
-               <div id="nginx" style="display:none;">
-       <?php
-       }
-       
        ?>
        <p style="color:green;">PHP <?php echo $neededPhpVersion; ?> or greater is available. You can <a href="install.php">start</a> the installation now.<br />
        PHP <?php echo $neededPhpVersion; ?> oder h&ouml;her wurde gefunden. Sie k&ouml;nnen mit der Installation <a href="install.php">beginnen</a>.</p>
        <?php
-       
-       if ($isNginx) { ?></div><?php }
 }
 ?>
 </body>