]> granicus.if.org Git - php/commitdiff
MFH: fix CGI SAPI check on Windows
authorMichael Wallner <mike@php.net>
Wed, 11 Jan 2006 15:19:52 +0000 (15:19 +0000)
committerMichael Wallner <mike@php.net>
Wed, 11 Jan 2006 15:19:52 +0000 (15:19 +0000)
run-tests.php

index b858e372e1bb1c5ed45474020ff42bc34f7cf6cb..b9924583f73496753e02ed5da80b5329579a83c3 100755 (executable)
@@ -1005,7 +1005,10 @@ TEST $file
 
        /* For GET/POST tests, check if cgi sapi is available and if it is, use it. */
        if ((!empty($section_text['GET']) || !empty($section_text['POST']))) {
-               if (file_exists("./sapi/cgi/php")) {
+               if (!strncasecmp(PHP_OS, "win", 3) && file_exists(dirname($php) ."/php-cgi.exe")) {
+                       $old_php = $php;
+                       $php = realpath(dirname($php) ."/php-cgi.exe") .' -C ';
+               } elseif (file_exists("./sapi/cgi/php")) {
                        $old_php = $php;
                        $php = realpath("./sapi/cgi/php") . ' -C ';
                } else {