-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension ini files missing priority in filename #272
Comments
Hi, I don't have an answer for Redhat, but on Ubuntu, you can add the priority directly inside the ini file (in /etc/php/X.X/cli/mods-available/foo.ini):
The important part is I haven't seen anything about that in this module documentation, so hopefully this will help other people who might have an issue with the loading order of php extensions. Regards, |
oops, just realised that works perfectly for the priority but the comment is added again and again at each puppet run 😢 |
I can confirm this behavior. The comment is added, but it's also added again on each subsequent puppet run. A good use case for needing a priority would be the pecl-couchbase extension. In the current version, it requires the PHP json library be loaded. But, because Example of the duplicated comments
|
Have you guys looked at this pull request? #257 |
Also want to add comment of my use case. We installed tideways-php, and it have a default priority of 40. Puppet generated give default priority of 20. so we can't override the priority with puppet unless we hardcode something outside of module (e.g. using fileline) |
@jk2l , #257 sounds good but it cannot be merge until conflicts are solved. Also this PR has been created 1 year ago and it hasn't been merged since. I suppose the "priority" management is not a priority for the maintainers 😁 |
@Vincent-- oh actually i created a new PR #335 but there is some discussion still need to be solve |
Just seen that, thank you for that 😄 I've also asked the ppa maintainer if he can manage the priority directly with the script, see last comment here oerdnj/deb.sury.org#575 |
Yesterday in IRC discussed with @igalic and considering maybe we should not use phpquery instead we use puppet recursive and do full manage extensions via puppet? |
One issue with phpenmod and phpdismod is that after you change the priority let say from 20 to 40 phpdismod can't detect 20-module.ini because it was looking at 40-module.ini if you are increase priority probably it is just override the priority of lower version, but decrease priority won't be able to work |
I agree we have only 2 options here:
About the "priority" change, this was the purpose of my comment in oerdnj/deb.sury.org#575 : phpenmod should also remove existing links with other priority than the current one |
i am in favour of using a puppet based solution… in a puppet module. |
PR #333 seems to provide an easy solution to this...? At least it fixes @JCotton1123 initial request. |
Sorry for the noise - this missing feature actually leads to errors: as I installed
This leads to mysql unavailable within PHP:
Environment: CentOS 7, PHP 5.6 from IUS, voxpopuli/puppet 4.0.0. |
Sorry guys for disturbing again... This issue is kind of a blocker and there seems to be a simple solution presented in #333. Could you give it a shoot, fix this ASAP and maybe push a bugfix release to the forge? Thanks for your great work! |
Bumping this again...This issue really needs to be fixed! |
This STILL is an issue for me. |
Me too |
@JCotton1123 is your particular problem solved with #333 being merged so this might be closed? @hunner could you please tag a release for this? |
@poikilotherm yes, #333 resolves my original issue. I'll close this. For others, I guess create a new issue with a better description if you're still facing an issue. |
What we probably want to avoid having to manually set the priorities manually is some kind of conf dir purge. And then make sure the module defines the default conf files properly. Then any files created by package managers are removed in favour of the puppet ones. Just a thought. |
Abandoning the issue template (sorry). I believe this affects all OS, versions of Puppet, versions of this module, and versions of php.
Each PHP extension will populate the php.d directly (/etc/php.d on RedHat) with one or more extension ini files. These ini files are prefixed with a number indicating a priority that causes them to be parsed in a specific order. The php::extension resource should be updated to include a "ini_priority" or similar parameter to mimic this behavior. This is a simple enough PR. However, I discovered this issue when I realized that the php.d directory was ending up with multiple ini setting files for each extension. Ex:
I am looking for suggestions on implementing the priority functionality and addressing the duplicate ini settings files issue in a user-friendly way. One option is to purge php.d but this is going to have unintended consequences. One option to place the burden on the user to make sure s/he sets the extension ini_priority (maybe with a default of 20 since most exts appear to have this prio) but this isn't really user friendly. We could create some kind of hash and lookup the default priority for each extension (again with a default of 20) but this is burdensome on us, the maintainers. Any thoughts?
The text was updated successfully, but these errors were encountered: