php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch php-cgi-path-detection.patch for CGI/CLI related Bug #61949Patch version 2012-05-05 06:56 UTC Return to Bug #61949 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: remi--- include.inc.orig 2012-05-05 08:41:43.225085081 +0200 +++ include.inc 2012-05-05 08:48:55.739095428 +0200 @@ -3,7 +3,9 @@ function get_cgi_path() /* {{{ */ { $php = getenv("TEST_PHP_EXECUTABLE"); - + if (!$php && defined('PHP_BINARY')) { + $php = PHP_BINARY; + } $cli = false; $cgi = false; @@ -20,6 +22,10 @@ if ($cli) { /* trying to guess ... */ + if (file_exists($php_path."-cgi") && is_executable($php_path."-cgi")) { + /* gotcha - run for install */ + return $php_path."-cgi"; + } $php_path = $php; for ($i = 0; $i < 2; $i++) { $slash_pos = strrpos($php_path, "/"); @@ -31,7 +37,7 @@ } if ($php_path && is_dir($php_path) && file_exists($php_path."/cgi/php-cgi") && is_executable($php_path."/cgi/php-cgi")) { - /* gotcha */ + /* gotcha - run from build tree*/ return $php_path."/cgi/php-cgi"; } return false; |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Sun Dec 22 01:01:30 2024 UTC |