116480
Goto Top

openbasedir restriction in effect. File proc loadavg is not within the allowed path C:inetpub in Cinetpubwwwrootlibmoodlelib.php

Hallo Zusammen,

ich habe ein Program Moodle und habe Debugging aktiviert.
Weiss wer was man in PHP.ini oder REchte bei so einer Meldung machen kann ?

open_basedir restriction in effect. File(/proc/loadavg) is not within the allowed path(s): (C:\inetpub) in C:\inetpub\wwwroot\lib\moodlelib.php

Unten im Browser kommt immer:

Warning: is_readable(): open_basedir restriction in effect. File(/proc/loadavg) is not within the allowed path(s): (C:\inetpub) in C:\inetpub\wwwroot\lib\moodlelib.php on line 8969 Warning: is_executable(): open_basedir restriction in effect. File(/usr/bin/uptime) is not within the allowed path(s): (C:\inetpub) in C:\inetpub\wwwroot\lib\moodlelib.php on line 8972

Also das ist vor dem Upload auch schon so.

Zeile 8969:

if (is_readable('/proc/loadavg') && $loadavg = @File('/proc/loadavg')) {


Zeile 8972:

} else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {

Das Windows Log schreibt leider nichts spezielles.


Gruss
Ralf

In der PHP.ini steht für Open Base Dir c:\Inetpub

Content-Key: 250702

Url: https://administrator.de/contentid/250702

Ausgedruckt am: 28.03.2024 um 21:03 Uhr

Mitglied: Arano
Arano 02.10.2014 um 09:05:47 Uhr
Goto Top
Hallo obtserver,
habe gerade eine hand im gips, darum pfeife ich ein wenig auf die rechtschreibung

Also, open_basedir ist ein schutzmechanismus mit dem die php-scripte in den angegebenen verzeichnissen "gefangen" werden. Bei dir hat php also nur zugriff auf die daten in dem verzeichnis c:\inetpub.
Und ohne zu wisen was du da tust, soltest due die einstwlung auch nicht ändern, da sonst auf wichtige systemdateien zugegrifen werden könnte.

Du hast aber noch ein problem !
(Icg kenne moodle nicht !)
Aber moodle möchte auf die dateien /proc/loadavg und /usr/bin/uptime zugreifen.
1. Müssten diese im openbasedir liegen damit der zugriff gestattet ist UND
2. Das sind zwei LINUX dateien, die gibt es unter windoes garnicht !

Kann moodle auf einem windowssrver verwedet werden ?


Schönen gruß
~arano
Mitglied: 116480
116480 02.10.2014 um 09:15:51 Uhr
Goto Top
Hallo Arano,

das Moodle ist eben auf einem Windowsserver installiert ! Da sollte die Meldungen wohl gar nicht kommen !

Gruss
Ralf
Mitglied: Arano
Arano 02.10.2014 um 12:45:42 Uhr
Goto Top
Hi,
ich glaube da hast du mich falsch verstanden.
Laut des programmierten quellcodes IST MOODLE FÜR LINUX !
Du hast es aber auf einem Windows.


~Arano
Mitglied: 116480
116480 02.10.2014 um 13:23:48 Uhr
Goto Top
Hallo,

ja klar. Das war der Download für Windows !

Gruss
Ralf
Mitglied: 116480
116480 02.10.2014 um 14:05:56 Uhr
Goto Top
Hallo,

in den Windows Files ist ein Part für Windows
Ausschnitt :

proc will only work under some linux configurations
while uptime is there under MacOSX/Darwin and other unices.

etc..
Sollte wie es aussieht unter Windows gar nicht aufgerufen werden. Zeigt aber Base Dir Restriktion an !


/ Grab the load average for the last minute.
/proc will only work under some linux configurations
// while uptime is there under MacOSX/Darwin and other unices.
if (is_readable('/proc/loadavg') && $loadavg = @File('/proc/loadavg')) {
list($serverload) = explode(' ', $loadavg);
unset($loadavg);
} else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
if (preg_match('/load averages?: (\d+[\.,:]\d+)/', $loadavg, $matches)) {
$serverload = $matches[1];
} else {
trigger_error('Could not parse uptime output!');
}
}
if (!empty($serverload)) {
$info['serverload'] = $serverload;
$info['html'] .= '<span class="serverload">Load average: '.$info['serverload'].'</span> ';
$info['txt'] .= "serverload: {$info['serverload']} ";
}


Gruss
Ralf
Mitglied: 116480
116480 18.11.2014 um 10:40:01 Uhr
Goto Top
man muss in der PHP.ini noch ein TEMP definieren, dann geht es !

Gruss
Ralf