Topic: Admin page not coming up
Hello,
I am unable to access the Administration section of my board. I can access any other area, and I can do some of the admin functions (such as deleting users...).
Any ideas?
Thanks!
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Admin page not coming up
Hello,
I am unable to access the Administration section of my board. I can access any other area, and I can do some of the admin functions (such as deleting users...).
Any ideas?
Thanks!
is the admin_index.php file still in your directory?
Yes.
What do you mean by "unable to access"?
It just times out... it never begins to load the page. But I can still access any of the other pages on the forum...
Try re-uploading the admin scripts. Maybe one of them is corrupt or something.
Can you access e.g. admin_forums.php?
I can access all admin_*.php files except for admin_index.php. I'll try uploading that file again..
Okay, I just uploaded that file again... still no go...
Try this (I'm just guessing, really)
FIND
// Get the server load averages (if possible)
if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg'))
{
// We use @ just in case
$fh = @fopen('/proc/loadavg', 'r');
$load_averages = @fread($fh, 64);
@fclose($fh);
$load_averages = @explode(' ', $load_averages);
$server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : 'Not available';
}
else if (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', @exec('uptime'), $load_averages))
$server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3];
else
$server_load = 'Not available';
REPLACE WITH
// Get the server load averages (if possible)
$server_load = 'Not available';
Note that this isn't a real "solution", I just want to see if that's the issue
Okay Smartys, I just tested your theory, and it now actually generates the page.
So any idea why that part isn't working?
Well, lets find out
Create a file called test.php
Insert the following contents:
if (file_exists('/proc/loadavg'))
echo "The file exists";
if (is_readable('/proc/loadavg'))
echo "We can read the file";
Then visit the page and paste exactly what comes out
Okay, just tried that and here is what it does.... It does load the page, but it is empty. View source shows that the page is empty as well...
This must be a bug in PHP. What PHP version are you running? Under what operating system?
FreeBSD 5.2.1 with PHP 4.4.0 and MySQL 4.0.18
Try the two checks Smartys posted individually. Do they both fail or is it just file_exists or is_readable?
Also, have a look in your apache error_log. Maybe there's something in there.
Neither one works individually...
No errors in error_log that are recent or relevant.
Check your phpinfo. Tell me the value of display_errors
Ok, one more check. What does the following PHP script output:
<?php
if (file_exists('/proc/loadavg'))
echo 'yes';
else
echo 'no';
?>
Smartys: display_errors is On
Rickard: It outputs "no"
OK, check the value of safe_mode
safe_mode is Off
OK, try this script
var_export(file_exists('/proc/loadavg'))
var_export(is_readable('/proc/loadavg'))
falsefalse
OK, run this in a test file then
var_export(preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', @exec('uptime'), $load_averages))
It's still attempting to connect... I think it's just going to time out...
With this, where is $load_averages defined?
PunBB Forums → PunBB 1.2 troubleshooting → Admin page not coming up
Powered by PunBB, supported by Informer Technologies, Inc.