From 036579b9074cebcf478043680355a893753c1a9e Mon Sep 17 00:00:00 2001
From: vogelor <vogelor@ispconfig3>
Date: Thu, 12 Feb 2009 09:02:41 -0500
Subject: [PATCH] fixed a bug in openbasedir (hopefully the last time)
---
server/plugins-available/apache2_plugin.inc.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1aef9f1..96cf1bb 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -573,7 +573,10 @@
$cgi_tpl = new tpl();
$cgi_tpl->newTemplate("php-cgi-starter.master");
- $cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]);
+ // This works, because php "rewrites" a symlink to the physical path
+ $cgi_tpl->setVar('open_basedir', $data["new"]["document_root"]);
+ // This will NOT work!
+ //$cgi_tpl->setVar('open_basedir', "/var/www/" . $data["new"]["domain"]);
$cgi_tpl->setVar('php_cgi_bin',$cgi_config["cgi_bin"]);
$cgi_starter_script = escapeshellcmd($cgi_starter_path.$cgi_config["cgi_starter_script"]);
--
Gitblit v1.9.1