mike Wed Jan 11 15:19:52 2006 UTC Modified files: (Branch: PHP_5_1) /php-src run-tests.php Log: MFH: fix CGI SAPI check on Windows http://cvs.php.net/viewcvs.cgi/php-src/run-tests.php?r1=1.226.2.27&r2=1.226.2.28&diff_format=u Index: php-src/run-tests.php diff -u php-src/run-tests.php:1.226.2.27 php-src/run-tests.php:1.226.2.28 --- php-src/run-tests.php:1.226.2.27 Wed Jan 4 15:17:41 2006 +++ php-src/run-tests.php Wed Jan 11 15:19:52 2006 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: run-tests.php,v 1.226.2.27 2006/01/04 15:17:41 helly Exp $ */ +/* $Id: run-tests.php,v 1.226.2.28 2006/01/11 15:19:52 mike Exp $ */ /* Sanity check to ensure that pcre extension needed by this script is available. * In the event it is not, print a nice error message indicating that this script will @@ -384,7 +384,7 @@ $html_output = is_resource($html_file); break; case '--version': - echo '$Revision: 1.226.2.27 $'."\n"; + echo '$Revision: 1.226.2.28 $'."\n"; exit(1); default: echo "Illegal switch '$switch' specified!\n"; @@ -1005,7 +1005,10 @@ /* 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 {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php