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

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

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


Revision 1.1 - (show annotations) (download)
Sun Feb 28 07:07:03 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
* Sun Feb 28 2021 Jean-Philipe Pialasse <tests@pialasse.com> 4.0.10.2-9.sme
- finish php74 pool integration [SME: 11043]

1 diff -Nur smeserver-phpmyadmin-4.0.10.2.old/createlinks smeserver-phpmyadmin-4.0.10.2/createlinks
2 --- smeserver-phpmyadmin-4.0.10.2.old/createlinks 2021-02-28 00:41:06.055000000 -0500
3 +++ smeserver-phpmyadmin-4.0.10.2/createlinks 2021-02-28 01:57:33.742000000 -0500
4 @@ -19,8 +19,10 @@
5 templates2events("/etc/httpd/conf/httpd.conf", $event);
6 templates2events("/etc/phpMyAdmin/config.inc.php", $event);
7 templates2events("/etc/e-smith/sql/init/phpmyadmin", $event);
8 + templates2events("/etc/opt/remi/php74/php-fpm.d/www.conf", $event);
9 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");;
10 safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
11 + safe_symlink("reload-or-restart", "root/etc/e-smith/events/$event/services2adjust/php74-php-fpm");
12 }
13 # PHP header and footer
14 safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-begin");
15 diff -Nur 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
16 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias 2021-02-28 00:41:06.062000000 -0500
17 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpmyadminAlias 2021-02-28 01:32:01.868000000 -0500
18 @@ -60,16 +60,17 @@
19 $OUT .= "allow from all";
20 }
21
22 - my $version = ($phpmyadmin{'PHPVersion'} || $PHPVersion || '73');
23 + # we do not want people to mess with this for the moment
24 + my $version = '74';
25
26 $OUT .= qq(
27 Satisfy all
28 - AddType application/x-httpd-php .php .php3
29 + AddType application/x-httpd-php .php
30
31 <FilesMatch .php\$\>
32 SetHandler "proxy:unix:/var/run/php-fpm/php$version-phpmyadmin.sock|fcgi://localhost"
33 </FilesMatch>
34 -
35 +SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1
36 </Directory>
37
38
39 diff -Nur 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
40 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin 2021-02-28 00:41:06.063000000 -0500
41 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpmyadmin 2021-02-28 02:01:03.246000000 -0500
42 @@ -7,7 +7,11 @@
43 my $memory_limit = ($phpmyadmin{MemoryLimit} || '512M');
44 $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/);
45 my $open_basedir= $phpmyadmin{PHPBaseDir} || '';
46 - $open_basedir = "/usr/share/phpMyAdmin:/var/lib/php/phpmyadmin:/var/log/phpmyadmin:/dev/urandom:/proc/meminfo:$open_basedir";
47 + $open_basedir = "/etc/phpMyAdmin/:/usr/share/phpMyAdmin:/var/lib/php/phpmyadmin:".
48 +"/var/lib/phpMyAdmin/temp:/var/lib/phpMyAdmin/save/:/var/lib/phpMyAdmin/upload:".
49 +"/usr/share/php/:".
50 +"/usr/share/phpMyAdmin/doc:".
51 +"/var/log/php/phpmyadmin:/usr/share/php/gettext/:/dev/urandom:/proc/meminfo:$open_basedir";
52 my $max_children = $phpmyadmin{'PHPmaxChildren'} || 20;
53 my $min_spare_servers = $phpmyadmin{'PHPminServers'} || 4;
54 my $start_servers = $phpmyadmin{'PHPstartServers'} || 6;
55 @@ -16,7 +20,7 @@
56 $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers;
57 $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers;
58 my $id = 'phpmyadmin'; # Note the package is phpMyAdmin
59 - $OUT .=<<_EOF;
60 + $OUT .=<<"_EOF";
61
62 [php$PHP_VERSION-$id]
63 user = www
64 @@ -31,20 +35,17 @@
65 pm.min_spare_servers = $min_spare_servers
66 pm.max_spare_servers = $max_spare_servers
67 pm.max_requests = $max_requests
68 -# Used in nextcloud
69 -#php_admin_value[session.save_path] = /var/lib/php/$id/session
70 +; Used in nextcloud
71 +php_admin_value[session.save_path] = /var/lib/php/$id/session
72 php_admin_value[session.gc_maxlifetime] = 86400
73 -# Used in nextcloud
74 -#php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
75 -# Note the cpaitalisation here - can't use $id
76 -php_admin_value[upload_tmp_dir] = /var/lib/php/phpMyAdmin/tmp
77 +php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
78 +php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
79 +php_admin_value[sys_temp_dir] = /var/lib/php/$id/tmp
80 php_admin_value[error_log] = /var/log/php/$id/error.log
81 -# Is slowlog needed?
82 -# slowlog = /var/log/php/phpmyadmin/slow.log
83 +slowlog = /var/log/php/$id/slow.log
84 php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
85 php_admin_flag[display_errors] = off
86 php_admin_flag[log_errors] = on
87 -php_admin_value[error_log] = syslog
88 php_admin_value[memory_limit] = $memory_limit
89 php_admin_value[max_execution_time] = 3600
90 php_admin_value[post_max_size] = $max_upload_size
91 @@ -57,6 +58,10 @@
92 php_admin_flag[allow_url_include] = off
93 php_admin_value[session.save_handler] = files
94 php_admin_flag[output_buffering] = off
95 +php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php
96 +php_flag[session.use_trans_sid] = off
97 +php_flag[track_vars] = on
98 +php_flag[magic_quotes_gpc] = off
99
100 _EOF
101
102 diff -Nur 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
103 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2021-02-28 00:41:06.063000000 -0500
104 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/10config 2021-02-28 01:30:26.765000000 -0500
105 @@ -22,8 +22,14 @@
106 my $adminaccess = ($phpmyadmin{'adminaccess'} || 'enabled');
107 my $multiaccess = ($phpmyadmin{'multiaccess'} || 'disabled');
108
109 +# this one could be tricky, with fpm we need to translate the auth from httpd
110 +# we need to have this in httpd.conf in the directory of phpmyadmin :
111 +# SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1
112 +# also need in the fpm pool this (and the file in the open base dir )
113 +# php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php
114 +# the line here could help debug :
115 +# error_log("current user: REDIRECT". $_SERVER['REDIRECT_REMOTE_USER'] ."REMOTE". $_SERVER['REMOTE_USER'] . " PHP_AUTH_USER". $_SERVER['PHP_AUTH_USER'] );
116 if (("$adminaccess" eq "enabled"))
117 -#|| ("$multiaccess" eq "enabled"))
118 {
119 $OUT .="if (\$scriptpath==\"/phpmyadmin/\" && \$_SERVER['PHP_AUTH_USER']=='admin')\n";
120 $OUT .="{\n";
121 diff -Nur smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory
122 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory 2021-02-28 00:41:06.060000000 -0500
123 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/20Directory 2021-02-28 01:30:26.767000000 -0500
124 @@ -3,6 +3,7 @@
125 */
126 $cfg['UploadDir'] = '/var/lib/phpMyAdmin/upload';
127 $cfg['SaveDir'] = '/var/lib/phpMyAdmin/save';
128 +$cfg['SessionSavePath'] = '/var/lib/php/phpmyadmin/session';
129 $cfg['VersionCheck'] = false;
130 $cfg['RetainQueryBox'] = true;
131 $cfg['ServerDefault'] = 1;
132 diff -Nur smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-begin smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-begin
133 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-begin 1969-12-31 19:00:00.000000000 -0500
134 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-begin 2021-02-28 01:30:26.768000000 -0500
135 @@ -0,0 +1,14 @@
136 +{
137 + $OUT = <<HERE;
138 +<?php
139 +/*
140 +HERE
141 +
142 + $OUT .=
143 + Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
144 +
145 + $OUT .= <<HERE;
146 +*/
147 +HERE
148 +
149 +}
150 diff -Nur smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-end smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-end
151 --- smeserver-phpmyadmin-4.0.10.2.old/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-end 1969-12-31 19:00:00.000000000 -0500
152 +++ smeserver-phpmyadmin-4.0.10.2/root/etc/e-smith/templates/etc/phpMyAdmin/config.inc.php/template-end 2021-02-28 01:30:26.770000000 -0500
153 @@ -0,0 +1 @@
154 +?>

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