Skip to content

Commit 1dab39b

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
2 parents 366f838 + df16579 commit 1dab39b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

sapi/fpm/tests/include.inc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
function get_fpm_path() /* {{{ */
44
{
55
$php_path = getenv("TEST_PHP_EXECUTABLE");
6-
76
for ($i = 0; $i < 2; $i++) {
87
$slash_pos = strrpos($php_path, "/");
98
if ($slash_pos) {
@@ -13,9 +12,16 @@ function get_fpm_path() /* {{{ */
1312
}
1413
}
1514

16-
if ($php_path && is_dir($php_path) && file_exists($php_path."/fpm/php-fpm") && is_executable($php_path."/fpm/php-fpm")) {
17-
/* gotcha */
18-
return $php_path."/fpm/php-fpm";
15+
16+
if ($php_path && is_dir($php_path)) {
17+
if (file_exists($php_path."/fpm/php-fpm") && is_executable($php_path."/fpm/php-fpm")) {
18+
/* gotcha */
19+
return $php_path."/fpm/php-fpm";
20+
}
21+
$php_sbin_fpm = $php_path."/sbin/php-fpm";
22+
if (file_exists($php_sbin_fpm) && is_executable($php_sbin_fpm)) {
23+
return $php_sbin_fpm;
24+
}
1925
}
2026
return false;
2127
}

0 commit comments

Comments
 (0)