Re: Admin page not coming up
Edit: My mistake, basically $load_averages is filled with the results
Try removing the @ from exec('uptime')
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Admin page not coming up
Edit: My mistake, basically $load_averages is filled with the results
Try removing the @ from exec('uptime')
Removed "@".
The page won't load.
Edit: new code
<?php
$s = explode( " ", exec("/sbin/sysctl -n kern.boottime") );
$a = str_replace( ",", "", $s[3]);
$uptime = time() - $a;
?>
Oh, and what's your PHP_OS set as?
FreeBSD 5.2.1 with PHP 4.4.0 and MySQL 4.0.18
Used your new code. It won't load the page.
Try this:
$data = shell_exec('uptime');
$uptime = explode(' up ', $data);
$uptime = explode(',', $uptime[1]);
$uptime = $uptime[0].', '.$uptime[1];
What is weird about this isn't that it can't determine the load averages but that the page doesn't even load properly.
Smartys: Still not loading with that new code
Rickard: It is very odd... As soon as I pull out any of the uptime code it works fine...
What's even more weird about this is that the script never outputs anything, not even a blank page (macosx sent me a link). It doesn't appear to timeout either. It's been "loading" in one of my firefox tabs for 10 minutes now. I wonder if this only happens on files that don't exist. What happens if you place this script in your PunBB root folder:
<?php
if (file_exists('index.php'))
echo 'yes';
else
echo 'no';
?>
PunBB Forums → PunBB 1.2 troubleshooting → Admin page not coming up
Powered by PunBB, supported by Informer Technologies, Inc.