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 16:33:05.269855203 +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 16:11:18.242843437 +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 16:32:44.798527156 +0100 |
71 |
@@ -0,0 +1,70 @@ |
72 |
+{ |
73 |
+ |
74 |
+if ($PHP_VERSION eq '73'){ |
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 = "/etc/phpMyAdmin:/usr/share/phpMyAdmin:/usr/share/phpMyAdmin/doc/html:/usr/share/php:/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 |
+; Deprecated |
108 |
+;php_admin_value[session.gc_maxlifetime] = 86400 |
109 |
+; Used in nextcloud |
110 |
+;php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache |
111 |
+; Note the capitalisation here - can't use $id |
112 |
+php_admin_value[upload_tmp_dir] = /var/lib/php/phpMyAdmin/tmp |
113 |
+php_admin_value[error_log] = /var/log/php/$id/error.log |
114 |
+; Is slowlog needed? |
115 |
+; slowlog = /var/log/php/phpmyadmin/slow.log |
116 |
+php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } |
117 |
+php_admin_flag[display_errors] = off |
118 |
+php_admin_flag[log_errors] = on |
119 |
+php_admin_value[error_log] = syslog |
120 |
+php_admin_value[memory_limit] = $memory_limit |
121 |
+php_admin_value[max_execution_time] = 3600 |
122 |
+php_admin_value[post_max_size] = $max_upload_size |
123 |
+php_admin_value[upload_max_filesize] = $max_upload_size |
124 |
+php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd |
125 |
+php_admin_value[open_basedir] = $open_basedir |
126 |
+php_admin_flag[allow_url_fopen] = on |
127 |
+php_admin_flag[file_upload] = on |
128 |
+php_admin_flag[session.cookie_httponly] = on |
129 |
+php_admin_flag[allow_url_include] = off |
130 |
+php_admin_value[session.save_handler] = files |
131 |
+php_admin_flag[output_buffering] = off |
132 |
+ |
133 |
+_EOF |
134 |
+ |
135 |
+ } |
136 |
+ else{ |
137 |
+ $OUT .= '; phpmyadmin is disabled'; |
138 |
+ } |
139 |
+} |
140 |
+} |
141 |
+ |
142 |
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 |
143 |
--- 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 |
144 |
+++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2020-12-18 16:11:18.243843454 +0100 |
145 |
@@ -39,7 +39,7 @@ |
146 |
} |
147 |
else |
148 |
{ |
149 |
- $OUT .="# standelaone admin configuration disabled"; |
150 |
+ $OUT .="# standalone admin configuration disabled"; |
151 |
} |
152 |
} |
153 |
# end of standalone login part |
154 |
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 |
155 |
--- smeserver-phpmyadmin-4.0.10.2.old/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 12:50:59.934881670 +0100 |
156 |
+++ smeserver-phpmyadmin-4.0.10.2/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 16:11:18.243843454 +0100 |
157 |
@@ -1,10 +1,11 @@ |
158 |
-magic_quotes_gpc= on |
159 |
-track_vars= on |
160 |
+#Moved to php pool |
161 |
+#magic_quotes_gpc= on |
162 |
+#track_vars= on |
163 |
#open_basedir=/usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin |
164 |
-session.save_path=/var/lib/phpMyAdmin/tmp |
165 |
-post_max_size=100M |
166 |
-upload_max_filesize=100M |
167 |
-memory_limit=500M |
168 |
-session.use_trans_sid=0 |
169 |
-upload_tmp_dir=/var/lib/phpMyAdmin/tmp |
170 |
+#session.save_path=/var/lib/phpMyAdmin/tmp |
171 |
+#post_max_size=100M |
172 |
+#upload_max_filesize=100M |
173 |
+#memory_limit=500M |
174 |
+#session.use_trans_sid=0 |
175 |
+#upload_tmp_dir=/var/lib/phpMyAdmin/tmp |
176 |
|