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 07:52 UTC Return to Bug #61949 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions: 2012-05-05 07:52 UTC | 2012-05-05 06:56 UTCDeveloper: remi@php.net--- include.inc.orig 2012-05-05 08:41:43.225085081 +0200 +++ include.inc 2012-05-05 08:48:55.739095428 +0200 --- include.inc.old 2012-05-05 08:41:43.225085081 +0200 +++ include.inc 2012-05-05 08:52:03.575099923 +0200 @@ -3,7 +3,9 @@ function get_cgi_path() /* {{{ */ { $php = getenv("TEST_PHP_EXECUTABLE"); + } $cli = false; $cgi = false; @@ -20,6 +22,10 @@ @@ -21,6 +23,10 @@ if ($cli) { /* trying to guess ... */ $php_path = $php; + 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, "/"); if ($slash_pos) { @@ -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")) { |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Wed Apr 24 16:01:31 2024 UTC |