both the php and mod_php install php.ini in /etc/php4. Problem is that in some situations it would be needed to have two different ini files since tuning may require different options for web-based apps (mod_php) and cli-based apps. what about using /etc/php4/mod_php/php.ini and /etc/php4/php/php.ini ? Reproducible: Always Steps to Reproduce: 1. 2. 3.
It's work in progress already. PHP already supports two ini files, $confdir/php.ini, $confdir/php-cli.ini
I've added an updated set of ebuilds to bug 15650 which also address this bug. /etc/php4/php.ini is used for PHP CLI, /etc/apache/conf/php.ini is used for apache 1, and /etc/apache2/conf/php.ini is used for apache 2. http://bugs.gentoo.org/show_bug.cgi?id=15650 No guarantees that it'll get into portage. Just thought you'd want to know. Best regards, Stu
okay, but there's a better solution : the man page for php (cli version - you can find it also in the sapi/cli dir of the source package) says: "php-cli.ini : the configuration file for the CLI version of PHP. php.ini : the standard configuration file will only be used when php-cli.ini cannot not be found." so using "doins php-cli.ini" in the php ebuild instead of "doins php.ini" is the only change needed: php.ini and php-cli.ini can co-exist in /etc/php4. imho this is a really lightweight change. just my 2 cents alessandro
I have the php-cli.ini method in there presently, but ultimately here is a better solution: /etc/php4/${SAPI}/php.ini then the /etc/php4 directory could have a pile of symlinks: /etc/php4/php-cli.ini -> /etc/php4/cli/php.ini /etc/php4/php-apache2.ini -> /etc/php4/apache2/php.ini /etc/php4/php-cgi.ini -> /etc/php4/cgi/php.ini /etc/php4/php-apache1.ini -> /etc/php4/apache1/php.ini This would allow for proper flexibility when more webservers that PHP can be used with are in portage (they aren't far away).
Please see mod_php-4.3.2-r3 and php-4.3.2-r1 which will be released tonight and see if this solution is suitable.