/[smecontribs]/rpms/smeserver-phpmyadmin/contribs10/smeserver-phpmyadmin-4.0.10.2-bz11043-configure-php-pool.patch
ViewVC logotype

Contents of /rpms/smeserver-phpmyadmin/contribs10/smeserver-phpmyadmin-4.0.10.2-bz11043-configure-php-pool.patch

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


Revision 1.3 - (show annotations) (download)
Sun Feb 28 03:30:17 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-phpmyadmin-4_0_10_2-14_el7_sme, smeserver-phpmyadmin-4_0_10_2-12_el7_sme, smeserver-phpmyadmin-4_0_10_2-10_el7_sme, smeserver-phpmyadmin-4_0_10_2-13_el7_sme, smeserver-phpmyadmin-4_0_10_2-11_el7_sme, HEAD
Changes since 1.2: +23 -63 lines
from reetspetit

1 diff -ruN smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias
2 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias 2020-12-18 12:50:59.934881670 +0100
3 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias 2020-12-18 13:15:41.857953186 +0100
4 @@ -1,14 +1,14 @@
5 {
6 # phpmyadmin
7 my $status = $phpmyadmin{'status'} || 'disabled';
8 -
9 +
10 if ($status eq 'enabled')
11 {
12 $OUT .="#-------------------------------------------------\n";
13 $OUT .="# phpMyAdmin settings from smeserver-phpmyadmin\n";
14 $OUT .="#-------------------------------------------------\n";
15 $OUT .="\n";
16 -
17 +
18 my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
19 my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
20 if (("$adminaccess" eq "enabled") || ("$multiaccess" eq "enabled"))
21 @@ -60,27 +60,16 @@
22 $OUT .= "allow from all";
23 }
24
25 - my $postmaxsize = ($phpmyadmin{'PostMaxSize'} || '100M');
26 - my $uploadmaxsize = ($phpmyadmin{'UploadMaxSize'} || '100M');
27 - my $memorylimit = ($phpmyadmin{'MemoryLimit'} || '500M');
28 + my $version = ($phpmyadmin{'PHPVersion'} || $PHPVersion || '73');
29
30 $OUT .= qq(
31 Satisfy all
32 AddType application/x-httpd-php .php .php3
33
34 <FilesMatch .php\$\>
35 - SetHandler "proxy:unix:/var/run/php-fpm/php71.sock|fcgi://localhost"
36 + SetHandler "proxy:unix:/var/run/php-fpm/php$version-phpmyadmin.sock|fcgi://localhost"
37 </FilesMatch>
38
39 - #php_flag magic_quotes_gpc on
40 - #php_flag track_vars on
41 - #php_admin_value open_basedir /usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin
42 - #php_admin_value session.save_path /var/lib/phpMyAdmin/tmp
43 - #php_admin_value post_max_size $postmaxsize
44 - #php_admin_value upload_max_filesize $uploadmaxsize
45 - #php_admin_value memory_limit $memorylimit
46 - #php_admin_flag session.use_trans_sid 0
47 - #php_admin_value upload_tmp_dir /var/lib/phpMyAdmin/tmp
48 </Directory>
49
50
51 diff -ruN smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias
52 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias 2020-12-18 12:50:59.934881670 +0100
53 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpmyadminAlias 2020-12-18 13:18:08.739170876 +0100
54 @@ -1,7 +1,11 @@
55 +#
56 +# 30phpmyadmin
57 +#
58 +
59 {
60 $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
61 -my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
62 -my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
63 + my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
64 + my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
65
66 if (($port eq "80") && ($haveSSL eq 'yes') && ("$adminaccess" eq "enabled" || "$multiaccess" eq "enabled"))
67 {
68 diff -ruN smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin
69 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin 1970-01-01 01:00:00.000000000 +0100
70 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin 2020-12-18 14:06:57.286829270 +0100
71 @@ -0,0 +1,69 @@
72 +{
73 +
74 +if ($PHP_VERSION eq '74'){
75 + if (($phpmyadmin{'status'} || 'disabled') eq 'enabled'){
76 + my $max_upload_size = ($phpmyadmin{MaxUploadSize} || '100M');# 104857600 bytes
77 + $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/);
78 + my $memory_limit = ($phpmyadmin{MemoryLimit} || '512M');
79 + $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/);
80 + my $open_basedir= $phpmyadmin{PHPBaseDir} || '';
81 + $open_basedir = "/usr/share/phpMyAdmin:/var/lib/php/phpmyadmin:/var/log/phpmyadmin:/dev/urandom:/proc/meminfo:$open_basedir";
82 + my $max_children = $phpmyadmin{'PHPmaxChildren'} || 20;
83 + my $min_spare_servers = $phpmyadmin{'PHPminServers'} || 4;
84 + my $start_servers = $phpmyadmin{'PHPstartServers'} || 6;
85 + my $max_spare_servers = $phpmyadmin{'PHPmaxServers'} || 8;
86 + my $max_requests = $phpmyadmin{'PHPmaxRequests'} || 1000;
87 + $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers;
88 + $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers;
89 + my $id = 'phpmyadmin'; # Note the package is phpMyAdmin
90 + $OUT .=<<_EOF;
91 +
92 +[php$PHP_VERSION-$id]
93 +user = www
94 +group = www
95 +listen.owner = root
96 +listen.group = www
97 +listen.mode = 0660
98 +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
99 +pm = dynamic
100 +pm.max_children = $max_children
101 +pm.start_servers = $start_servers
102 +pm.min_spare_servers = $min_spare_servers
103 +pm.max_spare_servers = $max_spare_servers
104 +pm.max_requests = $max_requests
105 +# Used in nextcloud
106 +#php_admin_value[session.save_path] = /var/lib/php/$id/session
107 +php_admin_value[session.gc_maxlifetime] = 86400
108 +# Used in nextcloud
109 +#php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
110 +# Note the cpaitalisation here - can't use $id
111 +php_admin_value[upload_tmp_dir] = /var/lib/php/phpMyAdmin/tmp
112 +php_admin_value[error_log] = /var/log/php/$id/error.log
113 +# Is slowlog needed?
114 +# slowlog = /var/log/php/phpmyadmin/slow.log
115 +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
116 +php_admin_flag[display_errors] = off
117 +php_admin_flag[log_errors] = on
118 +php_admin_value[error_log] = syslog
119 +php_admin_value[memory_limit] = $memory_limit
120 +php_admin_value[max_execution_time] = 3600
121 +php_admin_value[post_max_size] = $max_upload_size
122 +php_admin_value[upload_max_filesize] = $max_upload_size
123 +php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd
124 +php_admin_value[open_basedir] = $open_basedir
125 +php_admin_flag[allow_url_fopen] = on
126 +php_admin_flag[file_upload] = on
127 +php_admin_flag[session.cookie_httponly] = on
128 +php_admin_flag[allow_url_include] = off
129 +php_admin_value[session.save_handler] = files
130 +php_admin_flag[output_buffering] = off
131 +
132 +_EOF
133 +
134 + }
135 + else{
136 + $OUT .= '; phpmyadmin is disabled';
137 + }
138 +}
139 +}
140 +
141 diff -ruN smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config
142 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2020-12-18 12:50:59.934881670 +0100
143 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2020-12-18 14:16:59.441109384 +0100
144 @@ -39,7 +39,7 @@
145 }
146 else
147 {
148 - $OUT .="# standelaone admin configuration disabled";
149 + $OUT .="# standalone admin configuration disabled";
150 }
151 }
152 # end of standalone login part
153 diff -ruN smeserver-phpmyadmin-4.0.10.2.old/root/usr/share/phpMyAdmin/.unit.ini smeserver-phpmyadmin-4.0.10.2/root/usr/share/phpMyAdmin/.unit.ini
154 --- smeserver-phpmyadmin-4.0.10.2.old/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 12:50:59.934881670 +0100
155 +++ smeserver-phpmyadmin-4.0.10.2/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 12:53:11.108898355 +0100
156 @@ -1,10 +1,11 @@
157 -magic_quotes_gpc= on
158 -track_vars= on
159 +#Moved to php pool
160 +#magic_quotes_gpc= on
161 +#track_vars= on
162 #open_basedir=/usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin
163 -session.save_path=/var/lib/phpMyAdmin/tmp
164 -post_max_size=100M
165 -upload_max_filesize=100M
166 -memory_limit=500M
167 -session.use_trans_sid=0
168 -upload_tmp_dir=/var/lib/phpMyAdmin/tmp
169 +#session.save_path=/var/lib/phpMyAdmin/tmp
170 +#post_max_size=100M
171 +#upload_max_filesize=100M
172 +#memory_limit=500M
173 +#session.use_trans_sid=0
174 +#upload_tmp_dir=/var/lib/phpMyAdmin/tmp
175

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