/[smeserver]/rpms/smeserver-horde/sme10/smeserver-horde-1.0.0-bz10872-enable-php-fpm.patch
ViewVC logotype

Contents of /rpms/smeserver-horde/sme10/smeserver-horde-1.0.0-bz10872-enable-php-fpm.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Mar 11 03:38:13 2020 UTC (4 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-horde-1_0_0-11_el7_sme
Changes since 1.1: +0 -14 lines
* Tue Mar 10 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0.0-11.sme
- remove php3 references [SME: 10866]
- remove strict and warning alert from error log [SME: 10823]
- dedicated php-fpm pool for horde [SME: 10872]

1 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
2 --- 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
3 +++ smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/85HordeAccess 2020-03-10 13:39:28.044000000 -0400
4 @@ -28,8 +28,11 @@
5 $OUT .= " allow from ";
6 $OUT .= ( $horde{access} eq "public" ) ? "all" : $localAccess;
7 $OUT .= "\n";
8 +
9 +if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled")
10 +{
11 $OUT .= qq(
12 - AddType application/x-httpd-php .php
13 + AddType application/x-httpd-php .php .php3
14 php_value include_path '/usr/share/pear-addons:/usr/share/pear'
15 php_flag magic_quotes_gpc off
16 php_flag track_vars on
17 @@ -39,6 +42,22 @@
18 RewriteCond %{REQUEST_FILENAME} !-d
19 RewriteCond %{REQUEST_FILENAME} !-f
20 RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L]
21 +);
22 +}
23 +else
24 +{
25 + $OUT .= qq(
26 + <FilesMatch \.php\$>
27 + SetHandler "proxy:unix:/var/run/php-fpm/horde.sock|fcgi://localhost"
28 + </FilesMatch>
29 + RewriteEngine On
30 + RewriteCond %{REQUEST_FILENAME} !-d
31 + RewriteCond %{REQUEST_FILENAME} !-f
32 + RewriteRule ^(.*)\$ /horde/rampage.php [QSA,L]
33 +);
34 +}
35 +
36 + $OUT .= qq(
37 </Directory>
38
39 <Directory /usr/share/horde/config>
40 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
41 --- 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
42 +++ 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
43 @@ -0,0 +1,80 @@
44 +{
45 +use esmith::ConfigDB;
46 +my $c = esmith::ConfigDB->open_ro || die "Couldn't opeen the configuration database\n";
47 +my $horde = $c->get( "horde" );
48 +
49 + my $version = $horde->prop('PHPVersion') || '72';
50 + my $status = $horde->prop('status') || 'disabled';
51 + next unless ($status eq 'enabled' && $version eq $PHP_VERSION);
52 + my $key = $horde->key;
53 + my $pool_name = lc $key;
54 + my $memory_limit = $horde->prop('PHPMemoryLimit') || '128M';
55 + my $max_execution_time = $horde->prop('PHPMaxExecutionTime') || '30';
56 + my $max_input_time = $horde->prop('PHPMaxInputTime') || '60';
57 + my $allow_url_fopen = $horde->prop('PHPAllowUrlFopen') || 'disabled';
58 + my $post_max_size = $horde->prop('PHPPostMaxSize') || '10M';
59 + my $upload_max_filesize = $horde->prop('PHPUploadMaxFilesize') || '10M';
60 + my $file_upload = $horde->prop('PHPFileUpload') || 'enabled';
61 + my $include_path = ".:/usr/share/pear-addons:/usr/share/pear:/usr/share/pear-data";
62 + my $open_basedir = $horde->prop('PHPBaseDir') || '/usr/share/horde' .
63 + ':/etc/horde/' .
64 + ':/var/lib/php/' . $key .
65 + ":$include_path" .
66 + ":/etc/resolv.conf" ;
67 + my $disabled_functions = $horde->prop('PHPDisabledFunctions') || 'system,show_source,' .
68 + 'symlink,exec,dl,shell_exec,' .
69 + 'passthru,phpinfo,' .
70 + 'escapeshellarg,escapeshellcmd';
71 + # Format vars
72 + $file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off';
73 + $allow_url_fopen = "off" ; # ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off';
74 + $disabled_functions = join(', ', split /[,;:]/, $disabled_functions);
75 + $open_basedir = join(':', split(/[,;:]/, $open_basedir));
76 +
77 + $OUT .=<<"_EOF" if ($version eq $PHP_VERSION);
78 +
79 +[$pool_name]
80 +user = www
81 +group = www
82 +listen.owner = root
83 +listen.group = www
84 +listen.mode = 0660
85 +listen = /var/run/php-fpm/$pool_name.sock
86 +pm = dynamic
87 +pm.max_children = 15
88 +pm.start_servers = 3
89 +pm.min_spare_servers = 3
90 +pm.max_spare_servers = 4
91 +pm.max_requests = 1000
92 +slowlog = /var/log/$key/slow.log
93 +php_admin_value[session.save_path] = /var/lib/php/$key/session
94 +php_admin_value[opcache.file_cache] = /var/lib/php/$key/opcache
95 +php_admin_value[upload_tmp_dir] = /var/lib/php/$key/tmp
96 +php_admin_value[sys_temp_dir] = /var/lib/php/$key/tmp
97 +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
98 +php_admin_flag[display_errors] = off
99 +php_admin_value[error_reporting] =E_ERROR | E_WARNING | E_PARSE
100 +php_admin_value[error_log] = /var/log/$key/error.log
101 +php_admin_value[memory_limit] = $memory_limit
102 +php_admin_value[max_execution_time] = $max_execution_time
103 +php_admin_value[post_max_size] = $post_max_size
104 +php_admin_value[upload_max_filesize] = $upload_max_filesize
105 +php_admin_value[max_input_time] = $max_input_time
106 +php_admin_value[disable_functions] = $disabled_functions
107 +php_admin_flag[allow_url_fopen] = $allow_url_fopen
108 +php_admin_flag[file_upload] = $file_upload
109 +php_admin_flag[session.cookie_httponly] = on
110 +php_admin_flag[allow_url_include] = off
111 +php_admin_value[session.save_handler] = files
112 +php_admin_value[open_basedir] = $open_basedir
113 +
114 +php_value[include_path] = $include_path
115 +php_flag[magic_quotes_gpc] = off
116 +php_flag[track_vars] = on
117 +php_flag[session.use_trans_sid] = off
118 +
119 +
120 +_EOF
121 +
122 +
123 +}
124 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
125 --- smeserver-horde-1.0.0.old/root/etc/e-smith/templates/etc/rsyslog.conf/02horde 1969-12-31 19:00:00.000000000 -0500
126 +++ smeserver-horde-1.0.0/root/etc/e-smith/templates/etc/rsyslog.conf/02horde 2020-03-10 13:51:37.639000000 -0400
127 @@ -0,0 +1,3 @@
128 +# horde logging
129 +:programname, isequal, "HORDE" /var/log/horde/error.log
130 +:programname, isequal, "HORDE" ~
131 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
132 --- 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
133 +++ 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
134 @@ -2,10 +2,7 @@
135 /* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
136 // $Id: 08fc885cd91fbae2d752e274b554c5f1645129c8 $
137 $conf['vhosts'] = false;
138 -$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING;
139 -if (defined('E_STRICT')) \{
140 - $conf['debug_level'] &= ~E_STRICT;
141 -\}
142 +$conf['debug_level'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED;
143 $conf['max_exec_time'] = 0;
144 $conf['compress_pages'] = true;
145 $conf['secret_key'] = '{$horde{SecretKey}}';
146 @@ -128,7 +125,7 @@
147 $conf['share']['cache'] = false;
148 $conf['share']['driver'] = 'Sql';
149 $conf['cache']['default_lifetime'] = 1800;
150 -$conf['cache']['params']['dir'] = '/tmp/';
151 +$conf['cache']['params']['dir'] = '/var/lib/php/horde/tmp/';
152 $conf['cache']['params']['sub'] = 0;
153 $conf['cache']['driver'] = 'File';
154 $conf['cache']['use_memorycache'] = '';
155 @@ -168,7 +165,7 @@
156 $conf['mailer']['params']['auth'] = false;
157 $conf['mailer']['params']['lmtp'] = false;
158 $conf['mailer']['type'] = 'smtp';
159 -$conf['vfs']['params']['vfsroot'] = '/tmp';
160 +$conf['vfs']['params']['vfsroot'] = '/var/lib/php/horde/tmp';
161 $conf['vfs']['type'] = 'File';
162 $conf['sessionhandler']['type'] = 'Builtin';
163 $conf['sessionhandler']['hashtable'] = false;
164 @@ -239,7 +236,7 @@
165 if (($horde{'DeviceLog'} || 'disabled') eq 'enabled')
166 {
167 $OUT =<<'HERE';
168 -$conf['activesync']['logging']['path'] = '/tmp';
169 +$conf['activesync']['logging']['path'] = '/var/lib/php/horde/tmp';
170 $conf['activesync']['logging']['level'] = '1';
171 $conf['activesync']['logging']['type'] = 'perdevice';
172 HERE

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed