Edit report at https://bugs.php.net/bug.php?id=63782&edit=1
ID: 63782
User updated by: infected817 at gmail dot com
Reported by: infected817 at gmail dot com
Summary: php.ini not loaded by php-fpm unless -c switch is
used
-Status: Feedback
+Status: Open
Type: Bug
Package: *Configuration Issues
Operating System: Ubuntu Desktop 12.10
PHP Version: 5.4.9
Block user comment: N
Private report: N
New Comment:
Clarified php.ini location.
Previous Comments:
------------------------------------------------------------------------
[2012-12-16 22:28:53] infected817 at gmail dot com
Hi there,
I actually made a mistake when copying the contents of the phpinfo() output as
I had 2 virtual machines running at the time. My apologies for that.
I just checked again and these are the results:
Ubuntu Desktop 12.10
Configuration File (php.ini) Path /etc/php5/
Loaded Configuration File (none)
However, there is a valid php.ini in /etc/php5 that is not being loaded.
Is there anything else/more information I can check/provide?
------------------------------------------------------------------------
[2012-12-16 10:58:27] [email protected]
It's compiled with: /etc/php5/fpm
Configuration File (php.ini) Path */etc/php5/[fpm]*
Loaded Configuration File (none)
but you try to load php.ini from: /etc/php5 <-- no fpm
it's different.
------------------------------------------------------------------------
[2012-12-16 08:40:21] infected817 at gmail dot com
Description:
------------
I am seeing an issue where PHP 5.4.9 I compile myself or installed via apt-get
will not load the php.ini file even if it exists in the "Configuration File
Path" unless I pass in a -c "/path/to/php.in" to start up PHP-FPM.
1. To reproduce, compile PHP 5.4.9 with these configuration options:
--prefix=/usr/local/php-5.4.9 --with-config-file-path=/etc/php5/
2. Run make & make install.
3. Copy the stock php.ini-development to /etc/php5/php.ini
4. Create a phpinfo() file on the webserver.
5. Start PHP-FPM and browse to that phpinfo() file.
6. See the following result in the output:
Configuration File (php.ini) Path /etc/php5/fpm
Loaded Configuration File (none)
7. However, if we start PHP-FPM with the -c switch:
./php-fpm --fpm-config /etc/php5/php-fpm.conf -c /etc/php5/php.ini
We see that php.ini is loaded:
Configuration File (php.ini) Path /etc/php5/fpm
Loaded Configuration File php.ini
The configuration is not loaded at all unless you explicitly pass it using the
-c switch to php.ini. That is even though php.ini resides in the "Configuration
File Path"
Expected result:
----------------
php.ini should be loaded since it is in the "Configuration File Path"
Actual result:
--------------
php.ini is not loaded at all, even though it exists in the "Configuration File
Path"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63782&edit=1