From:             infected817 at gmail dot com
Operating system: Ubuntu Desktop 12.10
PHP version:      5.4.9
Package:          *Configuration Issues
Bug Type:         Bug
Bug description:php.ini not loaded by php-fpm unless -c switch is used

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 bug report at https://bugs.php.net/bug.php?id=63782&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63782&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63782&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63782&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63782&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63782&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63782&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63782&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63782&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63782&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63782&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63782&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63782&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63782&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63782&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63782&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63782&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63782&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63782&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63782&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63782&r=mysqlcfg

Reply via email to