Skip to content

Commit 8d01eb0

Browse files
committed
Added missing path /var/www/domain.tld/web to the php open basedir path.
1 parent 022d53c commit 8d01eb0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

install/tpl/apache_ispconfig_fcgi_starter.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ PHPRC=/etc/php5/cgi/
33
export PHPRC
44
export PHP_FCGI_MAX_REQUESTS=5000
55
export PHP_FCGI_CHILDREN=1
6-
exec /usr/lib/cgi-bin/php -d magic_quotes_gpc=off
6+
exec /usr/lib/cgi-bin/php -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/server/temp

install/tpl/server.ini.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ group=www-data
4444
apps_vhost_port=8081
4545
apps_vhost_ip=_default_
4646
apps_vhost_servername=
47-
php_open_basedir=[website_path]/web:[website_path]/tmp:/usr/share/php5:/tmp:/usr/share/phpmyadmin
47+
php_open_basedir=[website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin
4848
htaccess_allow_override=All
4949

5050
[dns]

interface/web/sites/web_domain_edit.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ function onAfterInsert() {
316316
$system_user = $app->db->quote('web'.$this->id);
317317
$system_group = $app->db->quote('client'.$client_id);
318318
$document_root = $app->db->quote(str_replace("[client_id]",$client_id,$document_root));
319-
$php_open_basedir = $app->db->quote(str_replace("[website_path]",$document_root,$web_config["php_open_basedir"]));
319+
$php_open_basedir = str_replace("[website_path]",$document_root,$web_config["php_open_basedir"]);
320+
$php_open_basedir = $app->db->quote(str_replace("[website_domain]",$web_rec['domain'],$php_open_basedir));
320321
$htaccess_allow_override = $app->db->quote($web_config["htaccess_allow_override"]);
321322

322323
$sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;
@@ -438,7 +439,8 @@ function onAfterUpdate() {
438439
$app->db->query($sql);
439440
}
440441
if($web_rec['php_open_basedir'] == '') {
441-
$php_open_basedir = $app->db->quote(str_replace("[website_path]",$document_root,$web_config["php_open_basedir"]));
442+
$php_open_basedir = str_replace("[website_path]",$document_root,$web_config["php_open_basedir"]);
443+
$php_open_basedir = $app->db->quote(str_replace("[website_domain]",$web_rec['domain'],$php_open_basedir));
442444
$sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;
443445
$app->db->query($sql);
444446
}

0 commit comments

Comments
 (0)