/[smeserver]/rpms/smeserver-php/sme10/smeserver-php-fpm-0.1.1-bz10871-ibay-php-fpm.patch
ViewVC logotype

Annotation of /rpms/smeserver-php/sme10/smeserver-php-fpm-0.1.1-bz10871-ibay-php-fpm.patch

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


Revision 1.1 - (hide annotations) (download)
Sun Feb 2 02:55:21 2020 UTC (4 years, 9 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-php-3_0_0-20_el7_sme, smeserver-php-3_0_0-44_el7_sme, smeserver-php-3_0_0-47_el7_sme, smeserver-php-3_0_0-7_el7_sme, smeserver-php-3_0_0-12_el7_sme, smeserver-php-3_0_0-22_el7_sme, smeserver-php-3_0_0-31_el7_sme, smeserver-php-3_0_0-25_el7_sme, smeserver-php-3_0_0-28_el7_sme, smeserver-php-3_0_0-45_el7_sme, smeserver-php-3_0_0-48_el7_sme, smeserver-php-3_0_0-11_el7_sme, smeserver-php-3_0_0-6_el7_sme, smeserver-php-3_0_0-10_el7_sme, smeserver-php-3_0_0-43_el7_sme, smeserver-php-3_0_0-46_el7_sme, smeserver-php-3_0_0-41_el7_sme, smeserver-php-3_0_0-30_el7_sme, smeserver-php-3_0_0-29_el7_sme, smeserver-php-3_0_0-4_el7_sme, smeserver-php-3_0_0-42_el7_sme, smeserver-php-3_0_0-5_el7_sme, smeserver-php-3_0_0-21_el7_sme, smeserver-php-3_0_0-24_el7_sme, smeserver-php-3_0_0-34_el7_sme, smeserver-php-3_0_0-3_el7_sme, smeserver-php-3_0_0-37_el7_sme, smeserver-php-3_0_0-40_el7_sme, smeserver-php-3_0_0-9_el7_sme, smeserver-php-3_0_0-18_el7_sme, smeserver-php-3_0_0-15_el7_sme, smeserver-php-3_0_0-8_el7_sme, smeserver-php-3_0_0-2_el7_sme, smeserver-php-3_0_0-35_el7_sme, smeserver-php-3_0_0-26_el7_sme, smeserver-php-3_0_0-32_el7_sme, smeserver-php-3_0_0-17_el7_sme, smeserver-php-3_0_0-14_el7_sme, smeserver-php-3_0_0-16_el7_sme, smeserver-php-3_0_0-13_el7_sme, smeserver-php-3_0_0-38_el7_sme, smeserver-php-3_0_0-19_el7_sme, smeserver-php-3_0_0-27_el7_sme, smeserver-php-3_0_0-39_el7_sme, smeserver-php-3_0_0-36_el7_sme, smeserver-php-3_0_0-33_el7_sme, smeserver-php-3_0_0-23_el7_sme, HEAD
* Sat Feb 01 2020 Jean-Philipe Pialasse <tests@pialasse.com> 3.0.0-2.sme
- modification for ibays php-fpm support in httpd.conf [SME: 10871]

1 jpp 1.1 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
2     --- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2020-01-28 14:25:30.000000000 -0500
3     +++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2020-02-01 21:51:32.193000000 -0500
4     @@ -6,29 +6,44 @@
5     my $adb = esmith::AccountsDB->open_ro();
6     foreach my $ibay ($adb->ibays)
7     {
8     + my $key = $ibay->key;
9     local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
10     if ($dynamicContent eq 'enabled')
11     {
12     $OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
13     - $OUT .= " AddType application/x-httpd-php .php .phtml\n";
14     - $OUT .= " AddType application/x-httpd-php-source .phps\n";
15     + if ($fastcgi_mod eq 'mod_proxy_fcgi')
16     + {
17     + my $version = $properties{'PHPVersion'} || $PHPVersion || '';
18     + ($version) = $version =~ /([0-9]{2})/ unless $version eq '';
19     + my $name = lc $key;
20     + $OUT .=<<"_EOF";
21     + <FilesMatch \.php\$>
22     + SetHandler "proxy:unix:/var/run/php-fpm/php$version-$name.sock|fcgi://localhost"
23     + </FilesMatch>
24     +_EOF
25     + }
26     + else
27     + {
28     + $OUT .= " AddType application/x-httpd-php .php .phtml\n";
29     + $OUT .= " AddType application/x-httpd-php-source .phps\n";
30    
31     - # Set the upload_tmp_folder where php can upload files
32     - my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled';
33     - $tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled';
34     - $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir);
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/' . $ibay->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/" . $ibay->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     $OUT .= "</Directory>\n";
63     }
64     }

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