From b5cd8ce029847b11409c2d762f5315ca71738866 Mon Sep 17 00:00:00 2001 From: sheena Date: Thu, 15 Jul 2021 15:40:05 +0100 Subject: [PATCH] (MODULES-10899) Load php module with the right libphp file --- manifests/mod/php.pp | 5 ++++- spec/classes/mod/php_spec.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/manifests/mod/php.pp b/manifests/mod/php.pp index 77cd0ed1f6..02c51be64b 100644 --- a/manifests/mod/php.pp +++ b/manifests/mod/php.pp @@ -67,7 +67,10 @@ $_lib = "librh-php${_php_version_no_dot}-php${_php_major}.so" } else { # Controls php version and libphp prefix - $_lib = "${libphp_prefix}${php_version}.so" + $_lib = $_php_major ? { + '8' => "${libphp_prefix}.so", + default => "${libphp_prefix}${php_version}.so", + } } $_module_id = $_php_major ? { '5' => 'php5_module', diff --git a/spec/classes/mod/php_spec.rb b/spec/classes/mod/php_spec.rb index 885b1a2e6d..5c11c49bca 100644 --- a/spec/classes/mod/php_spec.rb +++ b/spec/classes/mod/php_spec.rb @@ -72,7 +72,7 @@ it { is_expected.to contain_package('libapache2-mod-php8.0') } it { is_expected.to contain_file('php.load').with( - content: "LoadModule php_module /usr/lib/apache2/modules/libphp8.0.so\n", + content: "LoadModule php_module /usr/lib/apache2/modules/libphp.so\n", ) } end