1 |
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/db/accounts/migrate/20ibay-php smeserver-php-3.0.0/root/etc/e-smith/db/accounts/migrate/20ibay-php |
2 |
--- smeserver-php-3.0.0.old/root/etc/e-smith/db/accounts/migrate/20ibay-php 2021-09-17 22:29:19.715000000 -0400 |
3 |
+++ smeserver-php-3.0.0/root/etc/e-smith/db/accounts/migrate/20ibay-php 2021-09-17 22:32:21.548000000 -0400 |
4 |
@@ -5,7 +5,7 @@ |
5 |
PHPPostMaxSize => "PostMaxSize", |
6 |
PHPMaxExecutionTime => "MaxExecutionTime", |
7 |
PHPMemoryLimit => "MemoryLimit", |
8 |
- PHPAllowUrlFopen => "AllowUrlFopen", |
9 |
+ PHPAllowUrlfOpen => "AllowUrlFopen", |
10 |
PHPFileUpload => "FileUpload", |
11 |
PHPDisabledFunctions => "DisabledFunctions", |
12 |
PHPAutoPrependFile => "AutoPrependFile", |
13 |
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays |
14 |
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-09-17 22:29:19.715000000 -0400 |
15 |
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-09-17 22:54:48.304000000 -0400 |
16 |
@@ -38,16 +38,21 @@ |
17 |
# the following block is only in case phpmodule is enabled. |
18 |
if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled") |
19 |
{ |
20 |
- my $allow_url_fopen = $properties{'AllowUrlfOpen'} || $defaultPHPproperties{'AllowUrlfOpen'} ; |
21 |
+ my $allow_url_fopen = $properties{'AllowUrlFopen'} || $defaultPHPproperties{'AllowUrlFopen'} ; |
22 |
my $memoryLimit = $properties{'MemoryLimit'} || $defaultPHPproperties{'MemoryLimit'}; |
23 |
my $upmaxfileSize = $properties{'UploadMaxFilesize'} || $defaultPHPproperties{'UploadMaxFilesize'}; |
24 |
my $postmaxSize = $properties{'PostMaxSize'} || $defaultPHPproperties{'PostMaxSize'}; |
25 |
my $file_upload = $properties{'FileUpload'} || $defaultPHPproperties{'FileUpload'}; |
26 |
my $maxexecutionTime = (defined $properties{'MaxExecutionTime'}) ? $properties{'MaxExecutionTime'} : $defaultPHPproperties{'MaxExecutionTime'}; |
27 |
my $max_input_time = (defined $properties{'MaxInputTime'}) ? $properties{'MaxInputTime'} : $defaultPHPproperties{'MaxInputTime'}; |
28 |
+ my $display_errors = $properties{'DisplayErrors'} || 'off'; |
29 |
+ my $error_reporting = $properties{'ErrorReporting'} || 'E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT'; |
30 |
+ |
31 |
$maxexecutionTime = '0' if $maxexecutionTime eq 'unlimited'; |
32 |
$file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
33 |
$allow_url_fopen = ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
34 |
+ $display_errors = ($display_errors =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
35 |
+ $error_reporting = ($error_reporting eq 'E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT') ? '#default error_reporting' : "php_value[error_reporting] = $error_reporting"; |
36 |
|
37 |
$OUT .= " php_admin_flag allow_url_fopen $allow_url_fopen\n"; |
38 |
$OUT .= " php_admin_value memory_limit $memoryLimit\n"; |
39 |
@@ -56,6 +61,8 @@ |
40 |
$OUT .= " php_admin_flag file_upload $file_upload\n"; |
41 |
$OUT .= " php_admin_value max_input_time $max_input_time\n"; |
42 |
$OUT .= " php_admin_value max_execution_time $maxexecutionTime\n"; |
43 |
+ $OUT .= " php_flag display_errors $display_errors\n"; |
44 |
+ $OUT .= " $error_reporting\n"; |
45 |
|
46 |
# Set upload_tmp_dir and sys_temp_dir where php can upload files or write tmp files |
47 |
$tmpdir= "/var/lib/php/$key/tmp"; |
48 |
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays |
49 |
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-09-17 22:29:19.726000000 -0400 |
50 |
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-09-17 22:53:19.534000000 -0400 |
51 |
@@ -15,10 +15,12 @@ |
52 |
my $memory_limit = $ibay->prop('MemoryLimit') || $defaultPHPproperties{'MemoryLimit'}; |
53 |
my $max_execution_time = (defined $ibay->prop('MaxExecutionTime') ) ? $ibay->prop('MaxExecutionTime') : $defaultPHPproperties{'MaxExecutionTime'}; |
54 |
my $max_input_time = (defined $ibay->prop('MaxInputTime'))? $ibay->prop('MaxInputTime') : $defaultPHPproperties{'MaxInputTime'}; |
55 |
- my $allow_url_fopen = $ibay->prop('AllowUrlFopen') || $defaultPHPproperties{'AllowUrlfOpen'}; |
56 |
+ my $allow_url_fopen = $ibay->prop('AllowUrlFopen') || $defaultPHPproperties{'AllowUrlFopen'}; |
57 |
my $post_max_size = $ibay->prop('PostMaxSize') || $defaultPHPproperties{'PostMaxSize'}; |
58 |
my $upload_max_filesize = $ibay->prop('UploadMaxFilesize') || $defaultPHPproperties{'UploadMaxFilesize'}; |
59 |
my $file_upload = $ibay->prop('FileUpload') || $defaultPHPproperties{'FileUpload'}; |
60 |
+ my $display_errors = $ibay->prop('DisplayErrors') || 'off'; #we do not set this one at php level to avoid to have a whole server displaying errors and security issues |
61 |
+ my $error_reporting = $ibay->prop('ErrorReporting') || 'E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT'; #same reason, we hardcoded the default |
62 |
my $open_basedir = $ibay->prop('PHPBaseDir') || '/home/e-smith/files/ibays/' . $key . '/' . ':/var/lib/php/' . $key . '/'; |
63 |
|
64 |
my $disabled_functions = (defined $ibay->prop('DisabledFunctions')) ? $ibay->prop('DisabledFunctions') : $defaultPHPproperties{'DisabledFunctions'}; |
65 |
@@ -32,6 +34,8 @@ |
66 |
$file_upload = ($file_upload =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
67 |
$allow_url_fopen = ($allow_url_fopen =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
68 |
$disabled_functions = join(', ', split /[,;:]/, $disabled_functions); |
69 |
+ $display_errors = ($display_errors =~ m/^1|yes|on|enabled$/) ? 'on' : 'off'; |
70 |
+ $error_reporting = ($error_reporting eq 'E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT') ? '#default error_reporting' : "php_value[error_reporting] = $error_reporting"; |
71 |
$open_basedir = join(':', split(/[,;:]/, $open_basedir . $autoprepath)); |
72 |
|
73 |
$OUT .=<<"_EOF" if ($version eq $PHP_VERSION); |
74 |
@@ -56,7 +60,8 @@ |
75 |
php_admin_value[upload_tmp_dir] = /var/lib/php/$key/tmp |
76 |
php_admin_value[sys_temp_dir] = /var/lib/php/$key/tmp |
77 |
php_admin_value[mail.force_extra_parameters] = '-f $MailForceSender' |
78 |
-php_admin_flag[display_errors] = off |
79 |
+php_flag[display_errors] = $display_errors |
80 |
+$error_reporting |
81 |
php_admin_flag[log_errors] = on |
82 |
php_admin_value[error_log] = /var/log/php/$key/error.log |
83 |
php_admin_value[memory_limit] = $memory_limit |