cvs: php-master-web /scripts mirror-test

[email protected] ("Philip Olson")
Newsgroups php.webmaster
Message-ID <cvsphilip1228068298@cvsserver>
philip		Sun Nov 30 18:04:58 2008 UTC

  Modified files:              
    /php-master-web/scripts	mirror-test 
  Log:
  Added outbound connection test for external searches (closes bug #46562)
  
  
http://cvs.php.net/viewvc.cgi/php-master-web/scripts/mirror-test?r1=1.102&r2=1.103&diff_format=u
Index: php-master-web/scripts/mirror-test
diff -u php-master-web/scripts/mirror-test:1.102 php-master-web/scripts/mirror-test:1.103
--- php-master-web/scripts/mirror-test:1.102	Thu Sep 11 13:38:37 2008
+++ php-master-web/scripts/mirror-test	Sun Nov 30 18:04:58 2008
@@ -269,6 +269,23 @@
         continue;
     }
 
+    // -------------------------------------------------------------------------
+    // Sixth HTTP request, checking for search capability (outbound connections)
+    // (See bug#46562)
+
+    $url = "http://{$host['hostname']}/results.php?q=curl&p=manual&l=en";
+    $headers = get_headers($url, 1);
+    if($headers == false) {
+        // Probably timed out, let it slide for now
+        continue;
+    }
+
+    if(strpos($headers[0], "200") === false) {
+        $hosts[$index]['disable'] = true;
+        $hosts[$index]['problem'] = "Outbound connections appear disabled. See: http://php.net/mirroring-troubles.php#outbound";
+        continue;
+    }
+
 }
 
 // Go through all mirror sites checked
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.