Ich bin dabei mich ein wenig mit dem Keyhelp interface auseinander zu setzen, da ich gerne von ISPCONFIG3 wechseln möchte.
Derzeit teste ich Keyhelp in einer Virtuellen umgebung, mit Dynamisch erreichbarer Domain.
Ein bekannter von mir hat ein WBB Forum, welches bei mir gehostet werden soll.CPU cpuVersionAMD FX(tm)-4300 Quad-Core Processor | Kerne: 2
Betriebssystem osUbuntu 16.04 (64-Bit)
Webserver webserverApache/2.4.18 (Ubuntu)
PHP-Version phpVersion7.0.28-0ubuntu0.16.04.1
MySQL-Version dbVersion5.5.5-10.0.34-MariaDB-0ubuntu0.16.04.1
FTP-Server ftpVersionProFTPD 1.3.5a
Datenbank-Administration dbAdministrationphpMyAdmin 4.7.5
Webmail webmailRoundcube 1.3.3
Allerdings gibt es derzeit in der Virtuellen umgebung das im Topic genannte Problem.
Anbei unten ein Fehlerlog, wellches mir vom Forum zurück gegeben wird:
Wenn ich mit einem PHP Script her gehen möchte, und mir anzeigen lassen möchte, wieviel der Webspace noch an freien speicher hat, bekomme ich keine Ausgabe.Tue, 10 Apr 2018 10:21:42 +0000
Message: disk_free_space() has been disabled for security reasons
PHP version: 5.6.34
WoltLab Suite version: 3.1.1
Request URI: /
Referrer: https://www.xxxx.darktech.org/login/?ur ... ech.org%2F
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0
Peak Memory Usage: 9927944/335544320
======
Error Class: wcf\system\exception\ErrorException
Error Message: disk_free_space() has been disabled for security reasons
Error Code: 0
File: /home/users/xxxx/www/lib/system/WCF.class.php (324)
Extra Information: -
Stack Trace: [{"function":"handleError","class":"wcf\\system\\WCF","type":"::","args":[2,"disk_free_space() has been disabled for security reasons","\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php(37) : eval()'d code",4,{"php":"[redacted]"}],"file":"[internal function]","line":"?"},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php(37) : eval()'d code","line":4,"function":"disk_free_space","args":["\/"],"class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":37,"function":"eval","class":"","type":"","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":14,"function":"getPhpContent","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1___box.php","line":33,"function":"getContent","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":321,"args":["\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1___box.php"],"function":"include","class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":549,"function":"display","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["__box","wcf",false]},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":26,"function":"fetch","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["__box"]},{"file":"\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1_cms.php","line":3964,"function":"render","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":321,"args":["\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1_cms.php"],"function":"include","class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/page\/AbstractPage.class.php","line":323,"function":"display","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["cms","wcf"]},{"file":"\/home\/users\/xxxx\/www\/lib\/page\/AbstractPage.class.php","line":114,"function":"show","class":"wcf\\page\\AbstractPage","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/request\/Request.class.php","line":83,"function":"__run","class":"wcf\\page\\AbstractPage","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/request\/RequestHandler.class.php","line":96,"function":"execute","class":"wcf\\system\\request\\Request","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/index.php","line":9,"function":"handle","class":"wcf\\system\\request\\RequestHandler","type":"->","args":["wcf"]}]
Es wird mir lediglich " 0 " angezeigt.
Code: Select all
<?php
$cfg[path.to.dir] = "."; // . ist das aktuelle Verzeichnis
/*
zu give_size_formated():
give_size_formated('stringinbytes', [c|f|r], [c|d]);
- Das erste Argument gibt die Bytes an.
- Das zweite Argument "kürtzt" die Kommastellen
c: macht das Gleiche wie ceil();
f: macht das Gleiche wie floor();
r: macht das Gleiche wie round();
- Das dritte Argument ändert das Trennzeichen in der Ausgabe:
c: es wird ein Komma gesetzt
d: es wird ein Punkt gesetzt
*/
error_reporting(0);
function dirsize($directory)
{
if (!is_dir($directory)) return -1;
$size = 0;
if ($DIR = opendir($directory))
{
while (($dirfile = readdir($DIR)) !== false)
{
if (is_link($directory.'/'.$dirfile) || $dirfile == '.' || $dirfile == '..')
continue;
if (is_file($directory.'/'.$dirfile))
$size += filesize($directory.'/'.$dirfile);
else if (is_dir($directory.'/'.$dirfile))
{
$dirSize = dirsize($directory.'/'.$dirfile);
if ($dirSize >= 0) $size += $dirSize;
else return -1;
}
}
closedir($DIR);
}
return $size;
}
function give_size_formated($str1, $str2, $str3)
{
$kb = "1024";
$mb = $kb * "1024";
$gb = $mb * "1024";
$tb = $gb * "1024";
if ($str1 < $kb)
{
$output[1] = $str1;
$output[2] = "Byte";
}
elseif ($str1 < $mb)
{
$output[1] = $str1 / $kb;
$output[2] = "KB";
}
elseif ($str1 < $gb)
{
$output[1] = $str1 / $mb;
$output[2] = "MB";
}
elseif ($str1 < $tb)
{
$output[1] = $str1 / $gb;
$output[2] = "GB";
}
if ($str2 == "c")
{ $output[1] = ceil($output[1]); }
elseif ($str2 == "f")
{ $output[1] = floor($output[1]); }
elseif ($str2 == "r")
{ $output[1] = round($output[1], 3); }
if ($str3 == "c")
{ $output[1] = str_replace(".", ",", $output[1]); }
elseif ($str3 == "d")
{ $output[1] = str_replace(",", ".", $output[1]); }
$output[0] = $output[1]." ".$output[2];
return $output[0];
}
$diskspace[total] = disk_total_space($cfg[path.to.dir]);
$diskspace[free] = disk_free_space($cfg[path.to.dir]);
$diskspace[used] = $diskspace[total] - $diskspace[free];
$dirsize = dirsize($cfg[path.to.dir]);
echo "Total Space on Hard Disk is "; print give_size_formated($diskspace[total], r, c) ."<br />";
echo "Total Free Disk Space is "; print give_size_formated($diskspace[free], r, c) ."<br />";
echo "Total Space Used on Disk is "; print give_size_formated($diskspace[used], r, c) ."<br />";
$size = dirsize('./');
if ($size < 0) echo 'ERROR! Bad path!';
else echo 'Total Space of this Dir is ' . give_size_formated($size, r, c);
?>
Der Webspace ist auf " Unbegrenzt " eingestellt.Total Space on Hard Disk is 25,51 GB
Total Free Disk Space is 0 Byte
Total Space Used on Disk is 25,51 GB
Total Space of this Dir is 1,062 GB
In Keyhelp sind für den Account bzw. der Domain folgende Einstellungen eingestellt:
Disable Funktions
Openbase dir:dl, disk_free_space, diskfreespace, stream_socket_sendto, proc_get_status, proc_nice, proc_open, proc_terminate, proc_close, popen, curl_multi_exec, pcntl_exec, pcntl_fork, pcntl_setpriority, symlink, link, posix_kill, posix_mkfifo, posix_setsid, posix_setuid, posix_setpgid, posix_getpwuid, show_source, highlight_file, syslog, error_log, openlog, define_syslog_variables, apache_child_terminate, apache_setenv, apache_note, exec, system, shell_exec, passthru
Wenn ich her gehe, und nehme " disk_free_space, diskfreespace " raus, dann hat er ein Openbase Dir problem.##DOCROOT##/www:##DOCROOT##/files:##DOCROOT##/tmp
Wenn ich es unten rein setze, ebenfalls.
Was kann/soll ich tun, um das zu ändern ?<<<<<<<<fddb83638356c9ec97849d8e473cf3e2570b481a<<<<
Tue, 10 Apr 2018 10:51:02 +0000
Message: disk_free_space(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/users/xxxx/www:/home/users/xxxx/files:/home/users/xxxx/tmp)
PHP version: 5.6.34
WoltLab Suite version: 3.1.1
Request URI: /
Referrer:
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0
Peak Memory Usage: 9980456/335544320
======
Error Class: wcf\system\exception\ErrorException
Error Message: disk_free_space(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/users/xxxx/www:/home/users/xxxx/files:/home/users/xxxx/tmp)
Error Code: 0
File: /home/users/xxxx/www/lib/system/WCF.class.php (324)
Extra Information: -
Stack Trace: [{"function":"handleError","class":"wcf\\system\\WCF","type":"::","args":[2,"disk_free_space(): open_basedir restriction in effect. File(\/) is not within the allowed path(s): (\/home\/users\/xxxx\/www:\/home\/users\/xxxx\/files:\/home\/users\/xxxx\/tmp)","\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php(37) : eval()'d code",4,{"php":"[redacted]"}],"file":"[internal function]","line":"?"},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php(37) : eval()'d code","line":4,"function":"disk_free_space","args":["\/"],"class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":37,"function":"eval","class":"","type":"","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":14,"function":"getPhpContent","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1___box.php","line":33,"function":"getContent","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":321,"args":["\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1___box.php"],"function":"include","class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":549,"function":"display","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["__box","wcf",false]},{"file":"\/home\/users\/xxxx\/www\/lib\/data\/box\/PhpBox.class.php","line":26,"function":"fetch","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["__box"]},{"file":"\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1_cms.php","line":3964,"function":"render","class":"wcf\\data\\box\\PhpBox","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/template\/TemplateEngine.class.php","line":321,"args":["\/home\/users\/xxxx\/www\/templates\/compiled\/17_wcf_1_cms.php"],"function":"include","class":"","type":""},{"file":"\/home\/users\/xxxx\/www\/lib\/page\/AbstractPage.class.php","line":323,"function":"display","class":"wcf\\system\\template\\TemplateEngine","type":"->","args":["cms","wcf"]},{"file":"\/home\/users\/xxxx\/www\/lib\/page\/AbstractPage.class.php","line":114,"function":"show","class":"wcf\\page\\AbstractPage","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/request\/Request.class.php","line":83,"function":"__run","class":"wcf\\page\\AbstractPage","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/lib\/system\/request\/RequestHandler.class.php","line":96,"function":"execute","class":"wcf\\system\\request\\Request","type":"->","args":[]},{"file":"\/home\/users\/xxxx\/www\/index.php","line":9,"function":"handle","class":"wcf\\system\\request\\RequestHandler","type":"->","args":["wcf"]}]
<<<<
Ich habe " Ubuntu 16.04.4 LTS " als Standard.
Einzigste was ich an dem System installiert habe ist " htop "
Im Grunde ist Keyhelp nach der keyhelp hilfe installiert worden -> " wget https://install.keyhelp.de/get_keyhelp.php -O installkeyhelp.sh ; bash installkeyhelp.sh ;"
Ich weiss leider nicht mehr weiter.
Ich hänge seit 4 Tagen an dem Problem, und bekomme den Fehler nicht behoben.
Eine Hilfestellung wäre sehr wünschenswert.