From e1a0f0d0b172c59ec707cbc9c94475c770a07385 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 26 May 2014 07:48:11 +0200 Subject: on newer installations (php >= 5.4) we should not use safe_mode things --- manifests/vhost/php/standard.pp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'manifests') diff --git a/manifests/vhost/php/standard.pp b/manifests/vhost/php/standard.pp index 8498a82..69e7db8 100644 --- a/manifests/vhost/php/standard.pp +++ b/manifests/vhost/php/standard.pp @@ -122,11 +122,6 @@ define apache::vhost::php::standard( } else { $php_error_log = undef } - if $run_mode == 'fcgid' { - $safe_mode_gid = 'On' - } else { - $safe_mode_gid = undef - } if ('safe_mode_exec_dir' in $php_settings) { $php_safe_mode_exec_dir = $php_settings[safe_mode_exec_dir] @@ -184,6 +179,18 @@ define apache::vhost::php::standard( $the_open_basedir = "${smarty_path}${pear_path}${documentroot}:${real_path}/data:/var/www/upload_tmp_dir/${name}:/var/www/session.save_path/${name}" } + if $run_mode == 'fcgid' { + $safe_mode_gid = $::operatingsystem ? { + debian => undef, + default => $php_installation ? { + 'system' => 'On', + default => undef, + } + } + } else { + $safe_mode_gid = undef + } + $std_php_settings = { engine => 'On', upload_tmp_dir => "/var/www/upload_tmp_dir/${name}", -- cgit v1.2.3