-
-
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
RHEL8: keeps installing php7.2.4 #684
Comments
The issue is because the OS' default repo (e.g. |
I know this is an older issue, but it's still open and relevant, so I wanted to post a workaround for anyone having trouble with this installing PHP 7 instead of PHP 8. I understand that Oracle Linux isn't officially supported by the module, and that RHEL 7 is the only "officially" supported version, but the module works in Oracle Linux 8 aside from the package issues. My current environment consists of: With Oracle Linux 8, the default AppStream repo wants to use 7.4 by default, but also has 8.2 available to use. Unfortunately trying to specify PHP 8.2 in the PHP module has the same problems as this issue, and it will not install anything newer than 7.2.4. I have been trying to install PHP 8.3 using this module and I've had it working for months by manually creating the remi-release repository and setting my default DNF module for PHP to php:remi-8.3. This would set the expected version of PHP as the default module to install, and installations would use 8.3, but it would cause corrective changes every run because the PHP module would conflict with my manual packages trying to change it back to PHP 7. This worked for my needs, but it was frustrating having the corrective changes every run, so I spent some time playing with configurations until I found a way to have the php module install the correct package versions on its own without having to introduce corrective changes. In hindsight, the cleanest workaround to this issue was staring me right in my face by using php::globals to overwrite the package information. It took a lot of reading through the code trying to reverse engineer how the package management stuff was actually working, and I was misunderstanding how to use php::globals for awhile too. I spent quite a bit of time trying to get the php class parameter 'package_prefix' working but to no avail. What ultimately got everything working right was setting 'rhscl_mode' to 'remi' and 'php_version' to 'php83' in php::globals, and making sure to the remi repository is installed before I let the php module run. My workaround is still not perfect and ultimately it would be great to get this code fixed so this isn't necessary, but here is the code I have running in my production environment to enable this:
|
Hello - after trying many hacks and tricks in previous issues submitted, this still appears to be very non-trivial to do, and the
php_version
setting is essentially useless. How can a different version of PHP be installed? No matter what you enter forphp_version
, it still chooses something different.Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
PHP 7.2.4 gets installed, no matter what.
What behaviour did you expect instead
PHP 8.2 gets installed
The text was updated successfully, but these errors were encountered: