From:             jachym dot tousek at gmail dot com
Operating system: Ubuntu 9.04
PHP version:      5.3.0
PHP Bug Type:     *Configuration Issues
Bug description:  php.ini given to --with-config-file-path is not used

Description:
------------
This is the same as bug #31485.
I compiled php like this:

$ tar xvfz php-5-3-0.tar.gz
$ cd php-5-3-0/
$ ./configure --with-apxs2=/usr/bin/apxs2 --disable-short-tags
--with-openssl --with-zlib --enable-bcmath --with-bz2=/bin/bzip2
--enable-calendar --with-curl --with-curlwrappers --enable-exif
--enable-ftp --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
--with-ttf --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv
--with-gettext --with-ldap --enable-mbstring --with-mcrypt --with-mhash
--with-ming --with-pdo-mysql --with-pspell --with-snmp --enable-soap
--enable-sockets --without-sqlite --enable-sqlite-utf8 --with-tidy
--enable-wddx --with-xmlrpc --with-xsl --enable-zip --with-pear
--with-kerberos --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config
--with-freetype-dir=/usr  --with-zlib-dir=/usr --with-iconv-dir=/usr
--with-pdo-pgsql --with-openssl-dir=/usr --with-pgsql=/usr
--with-config-file-path=/etc/apache2/php53
$ make
$ sudo make -i install

Loaded php  using LoadModule php5_module
/usr/lib/apache2/modules/libphp5.so in httpd.conf file.
Copied php.ini-development as /etc/apache2/php53/php.ini.
Created info.php <?php phpinfo(); ?> in document root and run
http://localhost/info.php.

Expected result:
...
Configuration File (php.ini) Path       /etc/apache2/php53
Loaded Configuration File       /etc/apache2/php53/php.ini 
Scan this dir for additional .ini files         (none)
Additional .ini files parsed    (none)
...

Actual result:
...
Configuration File (php.ini) Path       /etc/apache2/php53
Loaded Configuration File       /usr/local/lib/php.ini 
Scan this dir for additional .ini files         (none)
Additional .ini files parsed    (none)
...

Deleting of /usr/local/lib/php.ini is not working either:
...
Configuration File (php.ini) Path       /etc/apache2/php53
Loaded Configuration File       (none) 
Scan this dir for additional .ini files         (none)
Additional .ini files parsed    (none)
...

But that is not all.:

$ php -v
PHP 5.3.0 (cli) (built: Aug  9 2009 15:55:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

$ php --ini
Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)


As you can see, using $ php --ini i got:
Configuration File (php.ini) Path: /usr/local/lib
but using <? phpinfo(); ?>:
Configuration File (php.ini) Path  /etc/apache2/php53

Real path osed by php is /usr/local/lib so the command
--with-config-file-path=/etc/apache2/php53 had affect only for phpinfo();
result but not for loaded php.ini file or $ php --ini command.

I need this for using multiple versions of php on the same server with
different php.ini files. For time being it is not possible.



-- 
Edit bug report at http://bugs.php.net/?id=49218&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49218&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49218&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49218&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49218&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49218&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49218&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49218&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49218&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49218&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49218&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49218&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49218&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49218&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49218&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49218&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49218&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49218&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49218&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49218&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49218&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49218&r=mysqlcfg

Reply via email to