Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360317 - PHP ebuilds: Include custom php.ini file
Summary: PHP ebuilds: Include custom php.ini file
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 17:25 UTC by Timo A. Hummel
Modified: 2011-03-30 20:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo A. Hummel 2011-03-24 17:25:04 UTC
Whenever you upgrade PHP, a new configuration file is installed in-place. If not paying attention (especially if someone needs to upgrade several machines at once), it's easy to wipe the old PHP configuration file. I think we all agree when I say:

* Replacing the current configuration file with defaults is bad.

However, there is already a solution: 

* Don't modify the php.ini file. Create a file in ext-active (e.g. custom.php) and place modifications there

This approach is not very well-known and is currently not documented. I propose to:

* Add a comment to the stock php.ini file to outline that custom configuration files can (and maybe should) be placed in ext-active
* Maybe provide a default, empty (except comments) in ext-active/custom.ini which isn't touched when updating PHP

I know that this bug report is subject to discussion. One may argue that you should stick with your old php.ini file when upgrading. Others might argue that if a already modified php.ini file exists, that no new php.ini files should be installed.

However, I believe that the ext-active/custom.ini approach is the best way to go, as it also enables users to swap in different php.ini files (like the ini files for dev and production, as proposed by the PHP devs) and still preserving important configurations, e.g. memory_limit and such.

Please do NOT close the bug until we discussed it.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2011-03-25 02:03:35 UTC
sounds like someone needs to learn to use dispatch-conf
Comment 2 Timo A. Hummel 2011-03-25 02:09:10 UTC
I can't see how your comment helps the discussion, Spanky, but feel free to enlighten us.
Comment 3 SpanKY gentoo-dev 2011-03-25 02:11:46 UTC
if you actually read the manual you'd see that dispatch-conf takes care of backing up previous files.  so when you do something stupid, you can easily undo the update.  fix your tool usage.

mommy, this fork hurts when i poke my tongue.  let's make all forks spoons!
Comment 4 Timo A. Hummel 2011-03-25 02:15:51 UTC
I have read the manual. Even if I didn't, everyone should know how to make backups. I am not asking to make a fork a spoon. I am asking to include a bit helpful to make a fork a better fork.

If you have nothing to say than sarcastic comments because you are unable to catch the issue, I'd recommend to not comment on such issues.
Comment 5 SpanKY gentoo-dev 2011-03-25 02:47:06 UTC
too bad you missed the point.  instead of trying to "fix" things that arent broken because you keep fat fingering a tool, use a tool that works for people with fat fingers.
Comment 6 Timo A. Hummel 2011-03-25 02:50:15 UTC
I did not ask to fix something. I asked to include a bit of convenience documentation. Too bad you missed that.
Comment 7 Ole Markus With (RETIRED) gentoo-dev 2011-03-25 11:53:59 UTC
(In reply to comment #0)
> Whenever you upgrade PHP, a new configuration file is installed in-place. 

It is not installed in-place. Configuration files are always preserved until you manually merge them using dispatch-conf.
Comment 8 Ole Markus With (RETIRED) gentoo-dev 2011-03-30 20:10:40 UTC
Also ext-active is reserved for symlinks to ext so that php will not try to load extensions that have been unmerged, but still allow users to keep their extension configs preserved in the ext directory.

Anyways, thanks for the suggestions.