php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49218 php.ini given to --with-config-file-path is not used
Submitted: 2009-08-11 07:43 UTC Modified: 2010-12-20 12:47 UTC
From: jachym dot tousek at gmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.0 OS: Ubuntu 9.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jachym dot tousek at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-11 07:43 UTC] jachym dot tousek at gmail dot com
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.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-11 08:16 UTC] jachym dot tousek at gmail dot com
Fixed myself using $ make clean before compilation.
 [2010-12-20 12:47 UTC] jani@php.net
-Package: Tidy +Package: Compile Failure
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Sep 20 04:00:01 2025 UTC