php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63611 Config file path doesn't work
Submitted: 2012-11-26 15:09 UTC Modified: 2013-10-24 06:46 UTC
Votes:5
Avg. Score:4.4 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: admin at marcelaraujo dot me Assigned:
Status: Open Package: FPM related
PHP Version: 5.4.9 OS: Centos 6.3 64bits
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at marcelaraujo dot me
New email:
PHP Version: OS:

 

 [2012-11-26 15:09 UTC] admin at marcelaraujo dot me
Description:
------------
Hi guys

I've built the PHP 5.4.9 source code but the PHP won't find php.ini in the /etc 
folder.

After I compile the PHP 5.4.8 and everything runs fine.


Test script:
---------------
./configure --enable-fpm --with-libdir=lib64 --prefix=/usr/local --with-layout=PHP --with-pear --with-apxs2 
--with-fpm-user=www-data --with-fpm-group=www-data --enable-debug --with-openssl --with-kerberos --with-zlib 
--enable-calendar --with-curl --with-curlwrappers --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr 
--with-png-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib --enable-exif --enable-gd-native-ttf 
--enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-intl --enable-mbstring --with-mcrypt 
--with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pspell --with-libedit --with-readline 
--enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvshm --with-xsl --enable-zip 
--with-pear --enable-zend-signals --enable-maintainer-zts --enable-calendar --enable-bcmath --with-gmp --enable-exif 
--with-mcrypt --with-mhash --with-zlib --with-bz2 --enable-zip --enable-ftp --enable-mbstring --with-iconv 
--enable-intl --with-icu-dir=/usr --with-gettext --with-pspell --enable-sockets --with-openssl --with-curl 
--with-curlwrappers --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr 
--with-xpm-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-libxml-dir=/usr 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-soap --with-xmlrpc --with-xsl 
--with-tidy=/usr --with-readline --enable-pcntl --enable-sysvshm --enable-sysvmsg --enable-shmop 
--enable-memory-limit --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php/conf.d 
--with-apxs2=/usr/sbin/apxs && make && make install

Expected result:
----------------
Configuration File (php.ini) Path
    -> /etc
Loaded Configuration File
    -> /etc/php.ini
Scan this dir for additional .ini files
    -> /etc/php/conf.d

Actual result:
--------------
Configuration File (php.ini) Path
    -> /etc
Loaded Configuration File
    -> none
Scan this dir for additional .ini files
    -> /etc/php/conf.d

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-26 15:29 UTC] laruence@php.net
did you build 5.4.9 freshly?

a common reason is , you re-configure the PHP , but didn't make clean before your 
re-compile it
 [2012-11-26 15:29 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2012-11-26 15:37 UTC] admin at marcelaraujo dot me
-Status: Feedback +Status: Open
 [2012-11-26 15:37 UTC] admin at marcelaraujo dot me
Yes, I did it.

I make download and then make the build in my server that did not have no PHP 
version installed.
 [2013-01-24 13:25 UTC] ilantipov at gmail dot com
I'm having the same problem on one server. Others are ok. php is runing in php-
fpm mode.


Info from php-info:

Configure Command	 './configure' '--enable-fpm' '--enable-libxml' '--with-
mcrypt' '--enable-mbstring' '--with-gd' '--with-mysql-sock' '--with-
mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql=mysqlnd' '--enable-
sockets' '--with-iconv' '--with-gettext' '--with-zlib' '--with-freetype-
dir=/usr' '--with-jpeg-dir=/usr' '--prefix=/usr/local/php-fpm' '--with-config-
file-path=/usr/local/php-fpm/etc' '--with-fpm-user=www-data' '--with-fpm-
group=www-data' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--
disable-simplexml' '--disable-xmlreader' '--disable-xmlwriter' '--disable-dom' 
'--disable-tokenizer' '--without-sqlite3' '--without-pdo-sqlite' '--with-curl' 
'--with-config-file-scan-dir=/usr/local/php-fpm/etc/conf.d'

At the same time:
Scan this dir for additional .ini files	no value
Additional .ini files parsed	(none)

While using comand-line:

root@backup:/usr/local/src/php-5.3.21# /usr/local/php-fpm/bin/php --ini | grep -
A 5 Scan
Scan for additional .ini files in: /usr/local/php-fpm/etc/conf.d
Additional .ini files parsed:      /usr/local/php-fpm/etc/conf.d/apc.ini,
/usr/local/php-fpm/etc/conf.d/memcached.ini,
/usr/local/php-fpm/etc/conf.d/xcache.ini

Linux backup 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64
PHP Version 5.3.21 but i tried many of them. Recompiling different versions from 
diferent folders won't help

drwxr-xr-x  3 root root  4096 янв.  24 17:13 ./
drwxr-xr-x 10 root root  4096 дек.   3 13:16 ../
drwxr-xr-x  2 root root  4096 янв.  24 17:08 conf.d/
-rw-r--r--  1 root root  1192 янв.  24 17:14 pear.conf
-rw-r--r--  1 root root 15228 дек.   3 14:48 php-fpm.conf
-rw-r--r--  1 root root 21667 янв.  24 17:13 php-fpm.conf.default
-rw-r--r--  1 root root 67702 янв.  24 15:30 php.ini

drwxr-xr-x 2 root root  4096 янв.  24 17:08 ./
drwxr-xr-x 3 root root  4096 янв.  24 17:13 ../
-rw-r--r-- 1 root root   309 янв.  24 16:55 apc.ini
-rw-r--r-- 1 root root    24 дек.   6 11:53 memcached.ini
-rw-r--r-- 1 root root  1174 янв.  24 15:29 xcache.ini
 [2013-01-27 14:29 UTC] admin at marcelaraujo dot me
Yes, I ran it in PHP-FPM mode.
 [2013-01-27 14:29 UTC] admin at marcelaraujo dot me
Yes, I ran it in PHP-FPM mode.
 [2013-10-24 06:46 UTC] yohgaki@php.net
-Package: Unknown/Other Function +Package: FPM related
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC