Changeset 1273
- Timestamp:
- 11/07/07 20:54:19 (1 year ago)
- Files:
-
- devel/lib/elgglib.php (modified) (1 diff)
- devel/mod/explodeping/lib.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/lib/elgglib.php
r1264 r1273 1266 1266 // /proc will only work under some linux configurations 1267 1267 // while uptime is there under MacOSX/Darwin and other unices 1268 if ( is_readable('/proc/loadavg') && $loadavg = @file('/proc/loadavg')) {1268 if (!ini_get('open_basedir') && is_readable('/proc/loadavg') && $loadavg = @file('/proc/loadavg')) { 1269 1269 list($server_load) = explode(' ', $loadavg[0]); 1270 1270 unset($loadavg); 1271 } else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {1271 } else if (!ini_get('open_basedir') && function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) { 1272 1272 if (preg_match('/load averages?: (\d+[\.:]\d+)/', $loadavg, $matches)) { 1273 1273 $server_load = $matches[1]; devel/mod/explodeping/lib.php
r1139 r1273 21 21 function explodeping_init() { 22 22 global $CFG, $messages; 23 24 // FIXME: workaround to annoying warning when is enabled open_basedir 25 // restriction 26 if (ini_get('open_basedir') || !ini_get('allow_url_fopen')) { return;} 27 23 28 if (!$explodeservice = get_record('datalists', 'name', 'explodeservice')) { 24 29
