diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP 2020-01-28 13:42:07.000000000 -0500 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP 2020-03-09 12:21:57.798000000 -0400 @@ -1,7 +1,7 @@ { $phpModule = $php{phpModule} || 'disabled'; # default we return with nothing activated - return "#PHP mod is disabled by default, please use PHP-fpm" unless ((exists $php{status} and $php{status} eq "enabled") or $phpModule eq "disabled"); + return "#PHP mod is disabled by default, please use PHP-fpm" unless (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled"); $PHPVersion = $php{'PHPVersion'} ||'73'; ($PHPVersion) = $PHPVersion =~ /([0-9]{2})/; diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2020-03-09 12:18:46.733000000 -0400 +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2020-03-09 12:31:08.658000000 -0400 @@ -11,6 +11,7 @@ if ($dynamicContent eq 'enabled') { $OUT .= "\nkey . "/html>\n"; + # configuration to enable php-fpm for the ibay if ($fastcgi_mod eq 'mod_proxy_fcgi') { my $version = $properties{'PHPVersion'} || $PHPVersion || ''; @@ -27,22 +28,26 @@ $OUT .= " AddType application/x-httpd-php .php .phtml\n"; $OUT .= " AddType application/x-httpd-php-source .phps\n"; - # Set the upload_tmp_folder where php can upload files - my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; - $tmpdir = ("/var/cache/e-smith/files/ibays/$key/tmp") if $tmpdir eq 'enabled'; - $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir); + # the following block is only in case phpmodule is enabled. + if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled") + { + # Set the upload_tmp_folder where php can upload files + my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; + $tmpdir = ("/var/cache/e-smith/files/ibays/$key/tmp") if $tmpdir eq 'enabled'; + $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir); - # Set the session folder where php can store its session instead of in global dir - my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; - $sessdir = ("/var/cache/e-smith/files/ibays/$key/session") if $sessdir eq 'enabled'; - $OUT .= " php_admin_value session.save_path $sessdir\n" unless ($sessdir eq 'disabled' || ! -d $sessdir); + # Set the session folder where php can store its session instead of in global dir + my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; + $sessdir = ("/var/cache/e-smith/files/ibays/$key/session") if $sessdir eq 'enabled'; + $OUT .= " php_admin_value session.save_path $sessdir\n" unless ($sessdir eq 'disabled' || ! -d $sessdir); - # Set the sandbox within which PHP is confined to play - my $basedir = $ibay->prop('PHPBaseDir') - || ("/home/e-smith/files/ibays/$key/"); - $basedir = $tmpdir . ":" . $basedir unless ($tmpdir eq 'disabled' || ! -d $tmpdir); - $basedir = $sessdir . ":" . $basedir unless ($sessdir eq 'disabled' || ! -d $sessdir); - $OUT .= " php_admin_value open_basedir $basedir\n"; + # Set the sandbox within which PHP is confined to play + my $basedir = $ibay->prop('PHPBaseDir') + || ("/home/e-smith/files/ibays/$key/"); + $basedir = $tmpdir . ":" . $basedir unless ($tmpdir eq 'disabled' || ! -d $tmpdir); + $basedir = $sessdir . ":" . $basedir unless ($sessdir eq 'disabled' || ! -d $sessdir); + $OUT .= " php_admin_value open_basedir $basedir\n"; + } } $OUT .= "\n"; }