1 |
jpp |
1.1 |
diff -Nur smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP |
2 |
|
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP 2020-01-28 13:42:07.000000000 -0500 |
3 |
|
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP 2020-03-09 12:21:57.798000000 -0400 |
4 |
|
|
@@ -1,7 +1,7 @@ |
5 |
|
|
{ |
6 |
|
|
$phpModule = $php{phpModule} || 'disabled'; |
7 |
|
|
# default we return with nothing activated |
8 |
|
|
- return "#PHP mod is disabled by default, please use PHP-fpm" unless ((exists $php{status} and $php{status} eq "enabled") or $phpModule eq "disabled"); |
9 |
|
|
+ return "#PHP mod is disabled by default, please use PHP-fpm" unless (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled"); |
10 |
|
|
|
11 |
|
|
$PHPVersion = $php{'PHPVersion'} ||'73'; |
12 |
|
|
($PHPVersion) = $PHPVersion =~ /([0-9]{2})/; |
13 |
|
|
diff -Nur 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 2020-03-09 12:18:46.733000000 -0400 |
15 |
|
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2020-03-09 12:31:08.658000000 -0400 |
16 |
|
|
@@ -11,6 +11,7 @@ |
17 |
|
|
if ($dynamicContent eq 'enabled') |
18 |
|
|
{ |
19 |
|
|
$OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n"; |
20 |
|
|
+ # configuration to enable php-fpm for the ibay |
21 |
|
|
if ($fastcgi_mod eq 'mod_proxy_fcgi') |
22 |
|
|
{ |
23 |
|
|
my $version = $properties{'PHPVersion'} || $PHPVersion || ''; |
24 |
|
|
@@ -27,22 +28,26 @@ |
25 |
|
|
$OUT .= " AddType application/x-httpd-php .php .phtml\n"; |
26 |
|
|
$OUT .= " AddType application/x-httpd-php-source .phps\n"; |
27 |
|
|
|
28 |
|
|
- # Set the upload_tmp_folder where php can upload files |
29 |
|
|
- my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; |
30 |
|
|
- $tmpdir = ("/var/cache/e-smith/files/ibays/$key/tmp") if $tmpdir eq 'enabled'; |
31 |
|
|
- $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir); |
32 |
|
|
+ # the following block is only in case phpmodule is enabled. |
33 |
|
|
+ if (exists $php{status} and $php{status} eq "enabled" and $phpModule eq "enabled") |
34 |
|
|
+ { |
35 |
|
|
+ # Set the upload_tmp_folder where php can upload files |
36 |
|
|
+ my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; |
37 |
|
|
+ $tmpdir = ("/var/cache/e-smith/files/ibays/$key/tmp") if $tmpdir eq 'enabled'; |
38 |
|
|
+ $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir); |
39 |
|
|
|
40 |
|
|
- # Set the session folder where php can store its session instead of in global dir |
41 |
|
|
- my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; |
42 |
|
|
- $sessdir = ("/var/cache/e-smith/files/ibays/$key/session") if $sessdir eq 'enabled'; |
43 |
|
|
- $OUT .= " php_admin_value session.save_path $sessdir\n" unless ($sessdir eq 'disabled' || ! -d $sessdir); |
44 |
|
|
+ # Set the session folder where php can store its session instead of in global dir |
45 |
|
|
+ my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; |
46 |
|
|
+ $sessdir = ("/var/cache/e-smith/files/ibays/$key/session") if $sessdir eq 'enabled'; |
47 |
|
|
+ $OUT .= " php_admin_value session.save_path $sessdir\n" unless ($sessdir eq 'disabled' || ! -d $sessdir); |
48 |
|
|
|
49 |
|
|
- # Set the sandbox within which PHP is confined to play |
50 |
|
|
- my $basedir = $ibay->prop('PHPBaseDir') |
51 |
|
|
- || ("/home/e-smith/files/ibays/$key/"); |
52 |
|
|
- $basedir = $tmpdir . ":" . $basedir unless ($tmpdir eq 'disabled' || ! -d $tmpdir); |
53 |
|
|
- $basedir = $sessdir . ":" . $basedir unless ($sessdir eq 'disabled' || ! -d $sessdir); |
54 |
|
|
- $OUT .= " php_admin_value open_basedir $basedir\n"; |
55 |
|
|
+ # Set the sandbox within which PHP is confined to play |
56 |
|
|
+ my $basedir = $ibay->prop('PHPBaseDir') |
57 |
|
|
+ || ("/home/e-smith/files/ibays/$key/"); |
58 |
|
|
+ $basedir = $tmpdir . ":" . $basedir unless ($tmpdir eq 'disabled' || ! -d $tmpdir); |
59 |
|
|
+ $basedir = $sessdir . ":" . $basedir unless ($sessdir eq 'disabled' || ! -d $sessdir); |
60 |
|
|
+ $OUT .= " php_admin_value open_basedir $basedir\n"; |
61 |
|
|
+ } |
62 |
|
|
} |
63 |
|
|
$OUT .= "</Directory>\n"; |
64 |
|
|
} |