Edit report at https://bugs.php.net/bug.php?id=62033&edit=1
ID: 62033
Updated by: fat@php.net
Reported by: js at justinsamuel dot com
Summary: php-fpm exits with status 0 on some failures to
start
-Status: Assigned
+Status: Feedback
Type: Bug
Package: FPM related
Operating System: Linux (Ubuntu 12.04)
PHP Version: 5.4.3
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
I can't reproduce the problem.
On my side with both up2date sources for 5.3 and 5.4:
root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $?
[23-May-2012 09:32:03] ERROR: [pool direct] cannot get uid for user 'fatprout'
[23-May-2012 09:32:03] ERROR: FPM initialization failed
255
root@dev:/home/fat/dev/php-git/php-5.4# ./sapi/fpm/php-fpm ; echo $?
[23-May-2012 09:32:29] ERROR: [pool direct] cannot get gid for group 'fatprout'
[23-May-2012 09:32:29] ERROR: FPM initialization failed
255
which version of PHP are you using ? (sources from php.net you have compiled or
a package from a distro ?)
Can you send me the result of
php-fpm --version
php-fpm -tt
thx
Previous Comments:
------------------------------------------------------------------------
[2012-05-14 22:00:38] js at justinsamuel dot com
Description:
------------
When the php-fpm command fails because the 'user' value of a pool specifies a nonexistent
user, php-fpm exits with 0 rather than a non-zero status. This is incorrect and causes problems with
init scripts, for example.
This happens with both php 5.3 and 5.4.
Test script:
---------------
Snippet of a pool configuration which will trigger the bug:
[example.com]
user = fakeuser
...
Expected result:
----------------
php-fpm should exit with a non-zero status in all cases where there is an error which causes it to
fail to start (including, but not limited to, nonexistent users).
Actual result:
--------------
$ php-fpm
[14-May-2012 14:39:40] ERROR: [pool example.com] cannot get uid for user 'fakeuser'
[14-May-2012 14:39:40] ERROR: FPM initialization failed
$ echo $?
0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62033&edit=1