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!

2

Re: Admin page not coming up

is the admin_index.php file still in your directory?

Re: Admin page not coming up

Yes.

Re: Admin page not coming up

What do you mean by "unable to access"?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Admin page not coming up

It just times out... it never begins to load the page. But I can still access any of the other pages on the forum...

Re: Admin page not coming up

Try re-uploading the admin scripts. Maybe one of them is corrupt or something.

Can you access e.g. admin_forums.php?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Admin page not coming up

I can access all admin_*.php files except for admin_index.php. I'll try uploading that file again..

Re: Admin page not coming up

Okay, I just uploaded that file again... still no go...

Re: Admin page not coming up

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

10 (edited by macosx 2005-10-25 21:53)

Re: Admin page not coming up

Okay Smartys, I just tested your theory, and it now actually generates the page.

So any idea why that part isn't working?

Re: Admin page not coming up

Well, lets find out smile
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

12

Re: Admin page not coming up

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...

Re: Admin page not coming up

This must be a bug in PHP. What PHP version are you running? Under what operating system?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

14

Re: Admin page not coming up

FreeBSD 5.2.1 with PHP 4.4.0 and MySQL 4.0.18

Re: Admin page not coming up

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.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

16

Re: Admin page not coming up

Neither one works individually...

No errors in error_log that are recent or relevant.

Re: Admin page not coming up

Check your phpinfo. Tell me the value of display_errors

Re: Admin page not coming up

Ok, one more check. What does the following PHP script output:

<?php

if (file_exists('/proc/loadavg'))
    echo 'yes';
else
    echo 'no';

?>
"Programming is like sex: one mistake and you have to support it for the rest of your life."

19

Re: Admin page not coming up

Smartys: display_errors is On

Rickard: It outputs "no"

Re: Admin page not coming up

OK, check the value of safe_mode

21

Re: Admin page not coming up

safe_mode is Off

Re: Admin page not coming up

OK, try this script

var_export(file_exists('/proc/loadavg'))
var_export(is_readable('/proc/loadavg'))

23

Re: Admin page not coming up

falsefalse

24 (edited by Smartys 2005-10-26 20:46)

Re: Admin page not coming up

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))

25

Re: Admin page not coming up

It's still attempting to connect... I think it's just going to time out...

With this, where is $load_averages defined?