Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions manifests/mod/php.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
$libphp_prefix = 'libphp'
) inherits apache::params {
include apache
$mod = "php${php_version}"
if $php_version <= '7' {
$mod = "php${php_version}"
} else {
$mod = "php"
}

if $apache::version::scl_httpd_version == undef and $apache::version::scl_php_version != undef {
fail('If you define apache::version::scl_php_version, you also need to specify apache::version::scl_httpd_version')
Expand Down Expand Up @@ -75,14 +79,22 @@
id => "php${_php_major}_module",
path => "${apache::lib_path}/mod_${mod}.so",
}
} else {
} elsif $php_version <= '7' {
::apache::mod { $mod:
package => $_package_name,
package_ensure => $package_ensure,
lib => $_lib,
id => "php${_php_major}_module",
path => $path,
}
} else {
::apache::mod { $mod:
package => $_package_name,
package_ensure => $package_ensure,
lib => "${libphp_prefix}.so",
id => "php_module",
path => $path,
}
}

include apache::mod::mime
Expand Down