diff -Nur e-smith-php-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays e-smith-php-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays --- e-smith-php-2.6.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2006-03-16 19:07:08.000000000 -0500 +++ e-smith-php-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2016-06-26 12:48:14.386000000 -0400 @@ -13,9 +13,15 @@ $OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n"; $OUT .= " AddType application/x-httpd-php-source .phps\n"; + # Set the upload_tmp_folder where php can upload files + my $tmpdir = $ibay->prop('PHPTmpDir') || 'enabled'; + $tmpdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled'; + $OUT .= " php_admin_value upload_tmp_dir $tmpdir\n" unless ($tmpdir eq 'disabled' || ! -d $tmpdir); + # Set the sandbox within which PHP is confined to play my $basedir = $ibay->prop('PHPBaseDir') || ("/home/e-smith/files/ibays/" . $ibay->key . "/"); + $basedir = $tmpdir . ":" . $basedir unless ($tmpdir eq 'disabled' || ! -d $tmpdir); $OUT .= " php_admin_value open_basedir $basedir\n"; $OUT .= "\n"; }