Bug #52045 [Com]: Incorrect php.ini file detection

From: Date: Fri, 11 Jun 2010 12:11:29 +0000
Subject: Bug #52045 [Com]: Incorrect php.ini file detection
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151328@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52045&edit=1

 ID:               52045
 Comment by:       fat@php.net
 Reported by:      FractalizeR at yandex dot ru
 Summary:          Incorrect php.ini file detection
 Status:           Assigned
 Type:             Bug
 Package:          FPM related
 Operating System: CentOS 5.5
 PHP Version:      5.3.2
 Assigned To:      fat

 New Comment:

Can you please try the attached patch on trunk ?

It must be also working on branche/PHP_5_3.

++ jerome


Previous Comments:
------------------------------------------------------------------------
[2010-06-11 14:10:14] fat@php.net

The following patch has been added/updated:

Patch Name: php_main_php_ini.c-fpm-cgi.patch
Revision:   1276258214
URL:       
http://bugs.php.net/patch-display.php?bug=52045&patch=php_main_php_ini.c-fpm-cgi.patch&revision=1276258214

------------------------------------------------------------------------
[2010-06-11 11:02:04] FractalizeR at yandex dot ru

Description:
------------
If there is a file or directory named php.ini in the current directory
and you start php-fpm from within this directory, phpinfo() output
shows, that php-fpm is trying to use this file/directory as main
configuration file for all it's children.

The case with such php.ini being a file seems to be undocumented and
unwanted behavior because by default [prefix]/lib/php.ini should be
used.

The case with php.ini being a directory leads to all php settings to be
silently reverted to their defaults. No error message is shown about
that php.ini is not a file or does not exist or whatever.

Test script:
---------------
cd ~
mkdir php.ini
php-fpm

After that open a page, containing phpinfo(); line and check php.ini
settings section.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52045&edit=1


Thread (11 messages)

« previous php.bugs (#151328) next »