|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52603 php-fpm default init script does not load php.ini
Submitted: 2010-08-14 07:21 UTC Modified: 2010-08-20 20:23 UTC
From: php at gigfa dot com Assigned: fat (profile)
Status: Not a bug Package: FPM related
PHP Version: 5.3.3 OS: Linux Debian 5.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php at gigfa dot com
New email:
PHP Version: OS:


 [2010-08-14 07:21 UTC] php at gigfa dot com
default php-fpm init script ( found in ./php-5.3.3/sapi/fpm/init.d.php-fpm after compilation ) does not load default php.ini file.
I think to get the problem fixed, we need to replace :
php_opts="--fpm-config $php_fpm_CONF"
with :
php_opts="-c %conf-path% --fpm-config $php_fpm_CONF"
in this file :


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-14 12:18 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: fat
 [2010-08-14 12:18 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

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.

the default php.ini file is in %{prefix}/lib/php.ini and this file is loaded by 
PHP-FPM even when it's launched by the sapi/fpm/init.d.php-fpm script.

How do you see it's not loaded ?
 [2010-08-14 14:40 UTC] php at gigfa dot com
-Status: Feedback +Status: Assigned
 [2010-08-14 14:40 UTC] php at gigfa dot com
I have compiled php with this option :
./configure \
--enable-fpm \

When I use phpinfo(); to see if the config file has loaded or not, I see :
Configuration File (php.ini) Path 	/etc/php5/php.ini
Loaded Configuration File 	(none)
 [2010-08-20 20:23 UTC]
-Status: Assigned +Status: Bogus
 [2010-08-20 20:23 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

This not a bug.

./configure ... --with-config-file-path=/etc/php5/php.ini is wrong. You had the 
previous phpinfo output:

#php -i | grep Configuration
Configuration File (php.ini) Path => /etc/php5/php.ini
Loaded Configuration File => (none)

You have to set a directory path to  --with-config-file-path. PHP will search 
there for a php.ini file. In your case, you have to use

./configure ... --with-config-file-path=/etc/php5 is wrong and you'll have the 
following phpinfo output

#php -i | grep Configuration
Configuration File (php.ini) Path => /etc/php5
Loaded Configuration File => /etc/php5/php.ini
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 18 01:05:45 2022 UTC