php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47809 PHP doesn't parse the php.ini file
Submitted: 2009-03-27 15:02 UTC Modified: 2009-04-01 11:05 UTC
From: privat at timohummel dot com Assigned: pajoye (profile)
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.0RC1 OS: Gentoo
Private report: No CVE-ID: None
 [2009-03-27 15:02 UTC] privat at timohummel dot com
Description:
------------
I just upgraded to PHP 5.3.0-rc1 using a custom ebuild. However, it seems that PHP does not parse (or silently ignore) changes done to the php.ini file. I copied the php.ini-development from the distribution to /etc/php/apache2-php5/php.ini.

phpinfo() tells me that the loaded configuration file is /etc/php/apache2-php5/php.ini, in which I also did my changes.

I wonder if that has something to do with the new development/production configurations.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-27 15:06 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2009-03-27 16:11 UTC] privat at timohummel dot com
I rebuilt PHP from the CVS, snapshot http://snaps.php.net/php5.3-200903271530.tar.bz2 (latest snapshot currently available). The issue remains, all php.ini-entries are ignored silently when using the apache2 SAPI.

Oddly enough, the CLI SAPI works fine and reads the config file as expected.

Here's my configure line:
'./configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--disable-cgi' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--with-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--disable-fileinfo' '--enable-ftp' '--with-gettext' '--with-gmp' '--disable-hash' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--without-mhash' '--without-msql' '--without-mssql' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--with-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--with-snmp' '--enable-soap' '--disable-sockets' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--with-tidy' '--enable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc' '--with-xsl' '--enable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--disable-flatfile' '--with-gdbm' '--disable-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-mysql=/usr' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--without-pdo-dblib' '--with-pdo-mysql=/usr' '--without-pdo-odbc' '--with-pdo-pgsql' '--with-pdo-sqlite=/usr' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--enable-sqlite-utf8' '--with-sqlite3'
 [2009-03-27 19:02 UTC] privat at timohummel dot com
I just ran apache with strace to make sure that the php.ini file is actually opened. It is opened, but I'm not sure how to debug if the values are getting parsed and probably overwritten later or if the values in the php.ini file are silently ignored.
 [2009-03-30 18:07 UTC] jani@php.net
What exactly is in that file?
 [2009-03-30 18:53 UTC] privat at timohummel dot com
It is the stock php.ini-development file, where I tried to set the default timezone to "Europe/Berlin". As it didn't work, I reverted my change of the timezone and tried modifying other values, for example, the error reporting and also simple values like "precision". None of my changes were shown after a restart of apache using the phpinfo()-call.

As I said before, changes are accepted when using the cli sapi.
 [2009-03-31 07:18 UTC] jani@php.net
To make this a bit simpler, delete that file and create one with only 
this:

include_path = "foo/bar"

Then check what phpinfo() says in apache about the include_path.
Note: this works fine for me..

Also, your configure line is kinda odd. Using --disable-all and only 
enabling what you really need would make the line quite more 
readable..


 [2009-03-31 17:30 UTC] privat at timohummel dot com
Okay, the issue seems to be resolved - but in the meanwhile I downgraded my whole system to 4.1.2; maybe there was some problem caused by the compiler? I was running gcc-4.3.3 previously.

By the way, my configure line looks odd since it is a gentoo ebuild - it needs to disable virtually everything in order to enable the user to add features by the USE flag.

I think we can close this bug now; but maybe someone can re-test with gcc-4.3.3 again?
 [2009-04-01 11:04 UTC] jani@php.net
Gentoo builds are flaky at best..
 [2009-04-01 11:05 UTC] privat at timohummel dot com
Excuse me, what kind of answer is that? The result would have been exactly the same if I had issued the configure line by hand.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC