From 1b0649d0cfcbaf7cd3cce2d89ff90489323659eb Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sun, 29 May 2016 09:56:33 +0200 Subject: [PATCH] replace CUSTOMER_TMP with the correct tmp-folder, depending what php-interface is being used Signed-off-by: Michael Kaufmann (d00p) --- admin_configfiles.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/admin_configfiles.php b/admin_configfiles.php index a1c626be..efbeba7a 100644 --- a/admin_configfiles.php +++ b/admin_configfiles.php @@ -20,6 +20,16 @@ require './lib/init.php'; if ($userinfo['change_serversettings'] == '1') { + $customer_tmpdir = '/tmp/'; + if (Settings::Get('system.mod_fcgid') == '1' && Settings::Get('system.mod_fcgid_tmpdir') != '') + { + $customer_tmpdir = Settings::Get('system.mod_fcgid_tmpdir'); + } + elseif (Settings::Get('phpfpm.enabled') == '1' && Settings::Get('phpfpm.tmpdir') != '') + { + $customer_tmpdir = Settings::Get('phpfpm.tmpdir'); + } + $replace_arr = Array( '' => $sql['user'], '' => 'MYSQL_PASSWORD', @@ -33,7 +43,7 @@ if ($userinfo['change_serversettings'] == '1') { '' => Settings::Get('system.vmail_uid'), '' => Settings::Get('system.vmail_gid'), '' => (Settings::Get('system.use_ssl') == '1') ? 'imaps pop3s' : '', - '' => (Settings::Get('system.mod_fcgid_tmpdir') != '') ? makeCorrectDir(Settings::Get('system.mod_fcgid_tmpdir')) : '/tmp/', + '' => makeCorrectDir($customer_tmpdir), '' => makeCorrectDir(FROXLOR_INSTALL_DIR), '' => makeCorrectDir(Settings::Get('system.bindconf_directory')), '' => Settings::Get('system.apachereload_command'),