com php-src: Try fpm path for testing in sbin as it is default target: sapi/fpm/tests/include.inc

From: Date: Sun, 29 Jan 2017 20:43:58 +0000
Subject: com php-src: Try fpm path for testing in sbin as it is default target: sapi/fpm/tests/include.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96901@lists.php.net to get a copy of this message
Commit: df16579642217708778e6917ce7c01cb9748df2e Author: Jakub Zelenka <bukka@php.net> Sun, 29 Jan 2017 20:43:58 +0000 Parents: 2fcf1259c6a9c1d70bcdfb96aeabc54c47e2a4a0 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=df16579642217708778e6917ce7c01cb9748df2e Log: Try fpm path for testing in sbin as it is default target Changed paths: M sapi/fpm/tests/include.inc Diff: diff --git a/sapi/fpm/tests/include.inc b/sapi/fpm/tests/include.inc index 6599255..8faf53d 100644 --- a/sapi/fpm/tests/include.inc +++ b/sapi/fpm/tests/include.inc @@ -3,7 +3,6 @@ function get_fpm_path() /* {{{ */ { $php_path = getenv("TEST_PHP_EXECUTABLE"); - for ($i = 0; $i < 2; $i++) { $slash_pos = strrpos($php_path, "/"); if ($slash_pos) { @@ -13,9 +12,16 @@ function get_fpm_path() /* {{{ */ } } - if ($php_path && is_dir($php_path) && file_exists($php_path."/fpm/php-fpm") && is_executable($php_path.."/fpm/php-fpm")) { - /* gotcha */ - return $php_path."/fpm/php-fpm"; + + if ($php_path && is_dir($php_path)) { + if (file_exists($php_path."/fpm/php-fpm") && is_executable($php_path."/fpm/php-fpm")) { + /* gotcha */ + return $php_path."/fpm/php-fpm"; + } + $php_sbin_fpm = $php_path."/sbin/php-fpm"; + if (file_exists($php_sbin_fpm) && is_executable($php_sbin_fpm)) { + return $php_sbin_fpm; + } } return false; }

« previous php.cvs (#96901) next »