#30327 [NEW]: --with-config-file-path option name, phpinfo() output mislead users

From: Date: Tue, 05 Oct 2004 04:40:12 +0000
Subject: #30327 [NEW]: --with-config-file-path option name, phpinfo() output mislead users
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-67117@lists.php.net to get a copy of this message
From:             gk at proliberty dot com
Operating system: Linux ; kernel 2.4.18
PHP version:      5.0.2
PHP Bug Type:     Feature/Change Request
Bug description:  --with-config-file-path option name, phpinfo() output mislead users

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 bug report at http://bugs.php.net/?id=30327&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30327&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30327&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30327&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30327&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30327&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30327&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30327&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30327&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30327&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30327&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30327&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30327&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30327&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30327&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30327&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30327&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30327&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30327&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30327&r=mysqlcfg


Thread (2 messages)

« previous php.bugs (#67117) next »