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 2016-06-26 12:49:22.216000000 -0400 +++ e-smith-php-2.6.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2016-06-26 12:58:19.037000000 -0400 @@ -18,10 +18,16 @@ $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 session folder where php can store its session instead of in global dir + my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled'; + $sessdir = ('/var/cache/e-smith/files/ibays/' . $ibay->key . '/session') if $sessdir eq 'enabled'; + $OUT .= " php_admin_value session.save_path $sessdir\n" unless ($sessdir eq 'disabled' || ! -d $sessdir); + # 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); + $basedir = $sessdir . ":" . $basedir unless ($sessdir eq 'disabled' || ! -d $sessdir); $OUT .= " php_admin_value open_basedir $basedir\n"; $OUT .= "\n"; }