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 --- 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 +++ 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 @@ -1,14 +1,14 @@ { # phpmyadmin my $status = $phpmyadmin{'status'} || 'disabled'; - + if ($status eq 'enabled') { $OUT .="#-------------------------------------------------\n"; $OUT .="# phpMyAdmin settings from smeserver-phpmyadmin\n"; $OUT .="#-------------------------------------------------\n"; $OUT .="\n"; - + my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); if (("$adminaccess" eq "enabled") || ("$multiaccess" eq "enabled")) @@ -60,27 +60,16 @@ $OUT .= "allow from all"; } - my $postmaxsize = ($phpmyadmin{'PostMaxSize'} || '100M'); - my $uploadmaxsize = ($phpmyadmin{'UploadMaxSize'} || '100M'); - my $memorylimit = ($phpmyadmin{'MemoryLimit'} || '500M'); + my $version = ($phpmyadmin{'PHPVersion'} || $PHPVersion || '73'); $OUT .= qq( Satisfy all AddType application/x-httpd-php .php .php3 - SetHandler "proxy:unix:/var/run/php-fpm/php71.sock|fcgi://localhost" + SetHandler "proxy:unix:/var/run/php-fpm/php$version-phpmyadmin.sock|fcgi://localhost" - #php_flag magic_quotes_gpc on - #php_flag track_vars on - #php_admin_value open_basedir /usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin - #php_admin_value session.save_path /var/lib/phpMyAdmin/tmp - #php_admin_value post_max_size $postmaxsize - #php_admin_value upload_max_filesize $uploadmaxsize - #php_admin_value memory_limit $memorylimit - #php_admin_flag session.use_trans_sid 0 - #php_admin_value upload_tmp_dir /var/lib/phpMyAdmin/tmp 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 --- 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 +++ 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 @@ -1,7 +1,11 @@ +# +# 30phpmyadmin +# + { $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; -my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); -my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); + my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled'); + my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled'); if (($port eq "80") && ($haveSSL eq 'yes') && ("$adminaccess" eq "enabled" || "$multiaccess" eq "enabled")) { 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 --- 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 +++ 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 @@ -0,0 +1,69 @@ +{ + +if ($PHP_VERSION eq '74'){ + if (($phpmyadmin{'status'} || 'disabled') eq 'enabled'){ + my $max_upload_size = ($phpmyadmin{MaxUploadSize} || '100M');# 104857600 bytes + $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/); + my $memory_limit = ($phpmyadmin{MemoryLimit} || '512M'); + $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/); + my $open_basedir= $phpmyadmin{PHPBaseDir} || ''; + $open_basedir = "/usr/share/phpMyAdmin:/var/lib/php/phpmyadmin:/var/log/phpmyadmin:/dev/urandom:/proc/meminfo:$open_basedir"; + my $max_children = $phpmyadmin{'PHPmaxChildren'} || 20; + my $min_spare_servers = $phpmyadmin{'PHPminServers'} || 4; + my $start_servers = $phpmyadmin{'PHPstartServers'} || 6; + my $max_spare_servers = $phpmyadmin{'PHPmaxServers'} || 8; + my $max_requests = $phpmyadmin{'PHPmaxRequests'} || 1000; + $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers; + $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers; + my $id = 'phpmyadmin'; # Note the package is phpMyAdmin + $OUT .=<<_EOF; + +[php$PHP_VERSION-$id] +user = www +group = www +listen.owner = root +listen.group = www +listen.mode = 0660 +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock +pm = dynamic +pm.max_children = $max_children +pm.start_servers = $start_servers +pm.min_spare_servers = $min_spare_servers +pm.max_spare_servers = $max_spare_servers +pm.max_requests = $max_requests +# Used in nextcloud +#php_admin_value[session.save_path] = /var/lib/php/$id/session +php_admin_value[session.gc_maxlifetime] = 86400 +# Used in nextcloud +#php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache +# Note the cpaitalisation here - can't use $id +php_admin_value[upload_tmp_dir] = /var/lib/php/phpMyAdmin/tmp +php_admin_value[error_log] = /var/log/php/$id/error.log +# Is slowlog needed? +# slowlog = /var/log/php/phpmyadmin/slow.log +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } +php_admin_flag[display_errors] = off +php_admin_flag[log_errors] = on +php_admin_value[error_log] = syslog +php_admin_value[memory_limit] = $memory_limit +php_admin_value[max_execution_time] = 3600 +php_admin_value[post_max_size] = $max_upload_size +php_admin_value[upload_max_filesize] = $max_upload_size +php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd +php_admin_value[open_basedir] = $open_basedir +php_admin_flag[allow_url_fopen] = on +php_admin_flag[file_upload] = on +php_admin_flag[session.cookie_httponly] = on +php_admin_flag[allow_url_include] = off +php_admin_value[session.save_handler] = files +php_admin_flag[output_buffering] = off + +_EOF + + } + else{ + $OUT .= '; phpmyadmin is disabled'; + } +} +} + 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 --- 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 +++ 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 @@ -39,7 +39,7 @@ } else { - $OUT .="# standelaone admin configuration disabled"; + $OUT .="# standalone admin configuration disabled"; } } # end of standalone login part 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 --- smeserver-phpmyadmin-4.0.10.2.old/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 12:50:59.934881670 +0100 +++ smeserver-phpmyadmin-4.0.10.2/root/usr/share/phpMyAdmin/.unit.ini 2020-12-18 12:53:11.108898355 +0100 @@ -1,10 +1,11 @@ -magic_quotes_gpc= on -track_vars= on +#Moved to php pool +#magic_quotes_gpc= on +#track_vars= on #open_basedir=/usr/share/php:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin -session.save_path=/var/lib/phpMyAdmin/tmp -post_max_size=100M -upload_max_filesize=100M -memory_limit=500M -session.use_trans_sid=0 -upload_tmp_dir=/var/lib/phpMyAdmin/tmp +#session.save_path=/var/lib/phpMyAdmin/tmp +#post_max_size=100M +#upload_max_filesize=100M +#memory_limit=500M +#session.use_trans_sid=0 +#upload_tmp_dir=/var/lib/phpMyAdmin/tmp