From 59a40f1eedd4503839d339439f5046f3b0005d98 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 11 Jan 2006 15:16:34 +0000 Subject: [PATCH] - fix CGI SAPI check on Windows --- run-tests.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index f69ec89084..3b0da78e1c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1047,7 +1047,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 { -- 2.40.0