diff -Nur smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess
--- smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess 2020-03-10 13:32:34.865000000 -0400
+++ smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess 2020-03-10 13:39:28.044000000 -0400
@@ -28,8 +28,11 @@
$OUT .= " allow from ";
$OUT .= ( $horde{access} eq "public" ) ? "all" : $localAccess;
$OUT .= "\n";
+
+if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled")
+{
$OUT .= qq(
- AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .php .php3
php_value include_path '/usr/share/pear-addons:/usr/share/pear'
php_flag magic_quotes_gpc off
php_flag track_vars on
@@ -39,6 +42,22 @@
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L]
+);
+}
+else
+{
+ $OUT .= qq(
+
+ SetHandler "proxy:unix:/var/run/php-fpm/horde.sock|fcgi://localhost"
+
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L]
+);
+}
+
+ $OUT .= qq(
diff -Nur smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde
--- smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20Horde 2020-03-10 13:44:11.633000000 -0400
@@ -0,0 +1,80 @@
+{
+use esmith::ConfigDB;
+my $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n";
+my $horde = $c->get( "horde" );
+
+ my $version = $horde->prop('PHPVersion') || '72';
+ my $status = $horde->prop('status') || 'disabled';
+ return unless ($status eq 'enabled' && $version eq $PHP_VERSION);
+ my $key = $horde->key;
+ my $pool_name = lc $key;
+ my $memory_limit = $horde->prop('PHPMemoryLimit') || '128M';
+ my $max_execution_time = $horde->prop('PHPMaxExecutionTime') || '30';
+ my $max_input_time = $horde->prop('PHPMaxInputTime') || '60';
+ my $allow_url_fopen = $horde->prop('PHPAllowUrlFopen') || 'disabled';
+ my $post_max_size = $horde->prop('PHPPostMaxSize') || '10M';
+ my $upload_max_filesize = $horde->prop('PHPUploadMaxFilesize') || '10M';
+ my $file_upload = $horde->prop('PHPFileUpload') || 'enabled';
+ my $include_path = ".:/usr/share/pear-addons:/usr/share/pear:/usr/share/pear-data";
+ my $open_basedir = $horde->prop('PHPBaseDir') || '/usr/share/horde' .
+ ':/etc/horde/' .
+ ':/var/lib/php/' . $key .
+ ":$include_path" .
+ ":/etc/resolv.conf" ;
+ my $disabled_functions = $horde->prop('PHPDisabledFunctions') || 'system,show_source,' .
+ 'symlink,exec,dl,shell_exec,' .
+ 'passthru,phpinfo,' .
+ 'escapeshellarg,escapeshellcmd';
+ # Format vars
+ $file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off';
+ $allow_url_fopen = "off" ; # ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off';
+ $disabled_functions = join(', ', split /[,;:]/, $disabled_functions);
+ $open_basedir = join(':', split(/[,;:]/, $open_basedir));
+
+ $OUT .=<<"_EOF" if ($version eq $PHP_VERSION);
+
+[$pool_name]
+user = www
+group = www
+listen.owner = root
+listen.group = www
+listen.mode = 0660
+listen = /var/run/php-fpm/$pool_name.sock
+pm = dynamic
+pm.max_children = 15
+pm.start_servers = 3
+pm.min_spare_servers = 3
+pm.max_spare_servers = 4
+pm.max_requests = 1000
+slowlog = /var/log/$key/slow.log
+php_admin_value[session.save_path] = /var/lib/php/$key/session
+php_admin_value[opcache.file_cache] = /var/lib/php/$key/opcache
+php_admin_value[upload_tmp_dir] = /var/lib/php/$key/tmp
+php_admin_value[sys_temp_dir] = /var/lib/php/$key/tmp
+php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
+php_admin_flag[display_errors] = off
+php_admin_value[error_reporting] =E_ERROR | E_WARNING | E_PARSE
+php_admin_value[error_log] = /var/log/$key/error.log
+php_admin_value[memory_limit] = $memory_limit
+php_admin_value[max_execution_time] = $max_execution_time
+php_admin_value[post_max_size] = $post_max_size
+php_admin_value[upload_max_filesize] = $upload_max_filesize
+php_admin_value[max_input_time] = $max_input_time
+php_admin_value[disable_functions] = $disabled_functions
+php_admin_flag[allow_url_fopen] = $allow_url_fopen
+php_admin_flag[file_upload] = $file_upload
+php_admin_flag[session.cookie_httponly] = on
+php_admin_flag[allow_url_include] = off
+php_admin_value[session.save_handler] = files
+php_admin_value[open_basedir] = $open_basedir
+
+php_value[include_path] = $include_path
+php_flag[magic_quotes_gpc] = off
+php_flag[track_vars] = on
+php_flag[session.use_trans_sid] = off
+
+
+_EOF
+
+
+}
diff -Nur smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/02horde smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/02horde
--- smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/02horde 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/02horde 2020-03-10 13:51:37.639000000 -0400
@@ -0,0 +1,3 @@
+# horde logging
+:programname, isequal, "HORDE" /var/log/horde/error.log
+:programname, isequal, "HORDE" ~
diff -Nur smeserver-horde-1.0.0.old/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP smeserver-horde-1.0.0/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP
--- smeserver-horde-1.0.0.old/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP 2020-03-10 13:32:34.868000000 -0400
+++ smeserver-horde-1.0.0/root/etc/e-smith/templates/usr/share/horde/config/conf.php/100ConfHordePHP 2020-03-10 13:40:09.051000000 -0400
@@ -2,10 +2,7 @@
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: 08fc885cd91fbae2d752e274b554c5f1645129c8 $
$conf['vhosts'] = false;
-$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING;
-if (defined('E_STRICT')) \{
- $conf['debug_level'] &= ~E_STRICT;
-\}
+$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['secret_key'] = '{$horde{SecretKey}}';
@@ -128,7 +125,7 @@
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'Sql';
$conf['cache']['default_lifetime'] = 1800;
-$conf['cache']['params']['dir'] = '/tmp/';
+$conf['cache']['params']['dir'] = '/var/lib/php/horde/tmp/';
$conf['cache']['params']['sub'] = 0;
$conf['cache']['driver'] = 'File';
$conf['cache']['use_memorycache'] = '';
@@ -168,7 +165,7 @@
$conf['mailer']['params']['auth'] = false;
$conf['mailer']['params']['lmtp'] = false;
$conf['mailer']['type'] = 'smtp';
-$conf['vfs']['params']['vfsroot'] = '/tmp';
+$conf['vfs']['params']['vfsroot'] = '/var/lib/php/horde/tmp';
$conf['vfs']['type'] = 'File';
$conf['sessionhandler']['type'] = 'Builtin';
$conf['sessionhandler']['hashtable'] = false;
@@ -239,7 +236,7 @@
if (($horde{'DeviceLog'} || 'disabled') eq 'enabled')
{
$OUT =<<'HERE';
-$conf['activesync']['logging']['path'] = '/tmp';
+$conf['activesync']['logging']['path'] = '/var/lib/php/horde/tmp';
$conf['activesync']['logging']['level'] = '1';
$conf['activesync']['logging']['type'] = 'perdevice';
HERE