]> granicus.if.org Git - php/commitdiff
Try fpm path for testing in sbin as it is default target
authorJakub Zelenka <bukka@php.net>
Sun, 29 Jan 2017 20:43:58 +0000 (20:43 +0000)
committerJakub Zelenka <bukka@php.net>
Sun, 29 Jan 2017 20:43:58 +0000 (20:43 +0000)
sapi/fpm/tests/include.inc

index 6599255a7a65eccd32a60bd9e184495d41a9226e..8faf53dcc210ce582be89b5178f5e4a351ccd2e0 100644 (file)
@@ -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;
 }