It's so much easier to drop files in a directory than to edit config files. For instance with Apache you can set it up to include configs from a directory. PHP4 has a flag for that does this, I'm not sure when it appeared: --with-config-file-scan-dir Attached is a patch that creates a single directory, /etc/php/extra-ini.d, and configures PHP to look in it. I have tested it with apache2 and cli and it works, very convenient. Originally I had it create a separate directory in each /etc/php/*-php4 subdirectory. I think one directory is okay. At the moment, if you install mod_php it will overwrite /usr/bin/php with a version that looks in the wrong subdirectory (apache-php instead of cli-php) so they could get mixed up anyway. Reproducible: Always Steps to Reproduce: Expected Results:
Created attachment 36564 [details, diff] diff of php-sapi.eclass
Well, the option's there in PHP 5. We could add a USE flag to switch this feature on. I'm not comfortable with switching this option on by default. Best regards, Stu
It's harmless to have it on.. if there are no files in the dir, nothing different happens. If there are .ini files, it loads them after loading the regular php.ini. There could be a USE flag (or the user can emerge with EXTRA_ECONF anyway) but there is some value in standardizing it: PHP ebuilds could also use the directory for config files, rather than messing with the php.ini files. FreeBSD does it this way.
Created attachment 36612 [details, diff] another php-sapi.eclass patch This is a similar patch but it only activates the feature if $PHPINISCANDIR is already set when the eclass is loaded.. so it can be turned on in indiviidual ebuilds with PHPINISCANDIR="/etc/php/extra-ini.d" .
Definitely *not* harmless to have it on by default. Most people won't know about it, and won't poilce the scanned directory effectively. We have users who like having very detailed control over what *optional* features are switched on or off by default. I'll add a USE flag so people can switch it on, but I'm not switching it on by default. Sorry. Best regards, Stu
Hi, This is fixed in the Gentoo PHP Overlay, by the new dev-lang/php package. Best regards, Stu