ID:               30327
 Comment by:       dominic dot clifton at gr-tech dot net
 Reported By:      gk at proliberty dot com
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux ; kernel 2.4.18
 PHP Version:      5.0.2
 New Comment:

I totally agree, it's very misleading.

In older versions of php it was also even more confusing that the value
changes from a directory to a file in the phpinfo() output once php
actually read a file from the directory!

Show a directory in all cases, even when php has read a file.  Show the
actual file that was read seperately.

It appears some work on thus bug has been addresses already:

php 5.2.6 shows this:

Configuration File (php.ini) Path => /opt/php5/etc
Loaded Configuration File => /opt/php5/etc/php.ini

however it still needs to be changed.

the configure option and the documentation needs to change from:

--with-config-file-path

to

--with-config-file-dir

then it'll be inline with:

--with-config-file-scan-dir

(feel free to support the current option for legacy reasons)


The php info output should also change from:

Configuration File (php.ini) Path => /opt/php5/etc
Loaded Configuration File => /opt/php5/etc/php.ini
Scan this dir for additional .ini files => /opt/php5/etc/conf.d 

to

Configuration File (php.ini) Directory => /opt/php5/etc
Loaded Configuration File => /opt/php5/etc/php.ini
Scan this dir for additional .ini files => /opt/php5/etc/conf.d


Previous Comments:
------------------------------------------------------------------------

[2004-10-05 06:39:52] gk at proliberty dot com

Description:
------------
Bug #26735 described this problem but was closed as 'bogus' when it is
really a valid feature request (bug) which needs to be addressed. Please
do not 'bogusify' this request since it could have saved me a lot of
time if not closed previously.

Both the configure option ('--with-config-file-path') and the phpinfo()
output ('Configuration File (php.ini) Path
        /usr/local/php5/lib/php5.ini') imply that this option refers to a
'file' when in fact it refers only to a directory - the name of the
config file can ONLY be 'php.ini'. This fact is completely hidden from
the user.

This could be corrected by renaming option to:
'--with-config-file-dir'
And changing phpinfo() output to:
'Configuration File (php.ini) Directory'

Oddly, php tries to read /usr/local/php5/lib/php5.ini/php.ini instead
of the file reported by phpinfo(): /usr/local/php5/lib/php5.ini

strace -eopen php -r '' 2>&1 | grep ini
...
open("/usr/local/php5/lib/php5.ini/php.ini", O_RDONLY) = -1 ENOTDIR
(Not a directory)


Bug #26735 said the following:

 ... the documentation (specifically ./configure --help) is unclear, as
well phpinfo() is unclear as it labels the value supplied with
--with-config-file-path as Configuration File (php.ini) Path, and
typically Path of a file would include the filename. Request that the
flag be renamed --with-config-file-dir and the corrosponding phpinfo()
label be changed as well... i suspect that labels is trivial compared to
making the programs obey the labels.


Reproduce code:
---------------
./configure \
....
--with-config-file-path=/usr/local/php5/lib/php5.ini;

<?php phpinfo(); ?>

Expected result:
----------------
Configuration File (php.ini) Path       /usr/local/php5/lib/
...


Actual result:
--------------
Configuration File (php.ini) Path       /usr/local/php5/lib/php5.ini
...

php5.ini file is NOT read



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


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

Reply via email to