From 0930f5fc2fb0d46757cc6e8ba50efcb34e1f7d33 Mon Sep 17 00:00:00 2001
From: laking <laking@ispconfig3>
Date: Sat, 2 Apr 2011 12:54:57 +0000
Subject: [PATCH] Added bugfix for php_open_basedir when client changes. line
 293.

---
 server/plugins-available/apache2_plugin.inc.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 7fb2ab573..f6161b9c4 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -290,6 +290,9 @@ class apache2_plugin {
 			exec('mv '.$data['old']['document_root'].' '.$new_dir);
 			$app->log('Moving site to new document root: mv '.$data['old']['document_root'].' '.$new_dir,LOGLEVEL_DEBUG);
 
+			// Handle the change in php_open_basedir
+			$data['new']['php_open_basedir'] = str_replace($data['old']['document_root'],$data['new']['document_root'],$data['old']['php_open_basedir']);
+
 			//* Change the owner of the website files to the new website owner
 			exec('chown --recursive --from='.escapeshellcmd($data['old']['system_user']).':'.escapeshellcmd($data['old']['system_group']).' '.escapeshellcmd($data['new']['system_user']).':'.escapeshellcmd($data['new']['system_group']).' '.$new_dir);
 
-- 
GitLab