You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} elsif ($facts['os']['family'] == 'RedHat') and ($_php_major == 8) {
# RedHat + PHP 8 drop the major version in apache module name.
$_lib = "${libphp_prefix}.so"
} else {
$_lib = "${libphp_prefix}${php_version}.so"
}
Line 92 returns a string (so $_php_major is a string), but in line 96 it is comparing it to an integer.
A fix could be replacing line 96 with (adding single quotes to 8: } elsif ($facts['os']['family'] == 'RedHat') and ($_php_major == '8') {
or even replace it with: } elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($php_version, '8') >= 0) {
like it is done on line 47:
Describe the Bug
When
$php_version
is set to8.0
and the OS is RedHat, the wrong php library is being loaded due to an incorrect comparison.It should load
libphp.so
, but instead it tries to loadlibphp8.0.so
.The problem is in line 96:
puppetlabs-apache/manifests/mod/php.pp
Lines 92 to 101 in 6bc1072
Line 92 returns a string (so
$_php_major
is a string), but in line 96 it is comparing it to an integer.A fix could be replacing line 96 with (adding single quotes to
8
:} elsif ($facts['os']['family'] == 'RedHat') and ($_php_major == '8') {
or even replace it with:
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($php_version, '8') >= 0) {
like it is done on line 47:
puppetlabs-apache/manifests/mod/php.pp
Line 47 in 6bc1072
I can create a PR if the bug is accepted as a bug.
Expected Behavior
The correct php library (
libphp.so
) should be loaded when using RedHat + PHP 8.Steps to Reproduce
Steps to reproduce the behavior:
$php_version
to8.0
in a RHEL environment.Environment
The text was updated successfully, but these errors were encountered: