Admin Upload Utility - Blank Admin panel


  -----  
Author Message

yan
Member

Tue Jul 11, 2006 11:41 pm   Post subject: Admin Upload Utility - Blank Admin panel
Hi,

Ive been using Admin Upload Utility on a previous server without issue, however i have today moved to a new server and have developed a problem where the admin panel is blank.

By removing the admin_**.php files from the admin dir i have narrowed it down to being admin_upload.php to be the cause of the problem. Removing this file solves the problem of the missing admin panel. I have narrowed it down to the following line in admin_upload.php that is causing the problem, as again, by removing the line, the admin panel works normally again, even with the admin_upload.php back in the admin dir.

Code:

$modules_dir = @opendir(AUU_PATH);


This wasnt a problem on the previous server, and the only difference is that the new server with the problem is running PHP5.0.2 where the old server that didnt have the problem was PHP4.3.9.

Not being a php coder, i dont know what that function does, if its needed or it there is a PHP5 'friendly' version Confused

Does anyone have any ideas or suggestions for what i could try so i dont have to remove the file or remove the function that is causing the problem?

Thanks in advance..

Yan
 

Thoul
Administrator

Wed Jul 12, 2006 4:40 pm   Post subject: re: Admin Upload Utility - Blank Admin panel
There may be some type of permissions change that you're not aware of. Change that line to:

Code:

$modules_dir = opendir(AUU_PATH);


The @ in the original line supresses any error messages that would have been generated by the function. If there are any error messages, removing the @ will make them appear and that might give us a better idea of what's causing the problem with this function.
 

yan
Member

Wed Jul 12, 2006 5:04 pm   Post subject:
Thanks for the quick response.

I removed the @ as you suggested but still get no output or error either on the page or in the http logs.

A permission problem would make sense as when i moved the forum to the new server I backup up the old dir and then ftp'd it to the new box. I did try to duplicate permissions by comparing to the original box but some may have been missed. Could you point out any obvious ones that I should check for specific to AUU?

Regards

Yan
 

Thoul
Administrator

Wed Jul 12, 2006 10:49 pm   Post subject: re: Admin Upload Utility - Blank Admin panel
The directory being dealt with here is mods/uploader/, so you could check the permissions on that. Standard permissions that allow the directory to be browsed should be good enough.

I was really hoping that there would be an error message on the page, as that would confirm if it is a permissions error, a missing directory, or something of that nature. I don't think the PHP version is the issue, as there seems to be no major difference with this function in PHP 4 vs. 5 according to the PHP manual.

It could be an issue with the PHP configuration setting "open_basedir," but I don't recall if that setting applies to this function or not.
 

yan
Member

Thu Jul 13, 2006 11:23 am   Post subject:
I have now ruled out the php ver as being the issue, i backed my forum up, did a fresh install of a blank phpbb forum and installed the admin_upload.php without issue.

I removed the test forum and restored the backup of the forum with the problem. At which point i realised that the blank forum didnt have any upload modules installed.

I removed the 2 modules i have installed (smilies and avatars) and bingo - a working admin panel. I then re-installed the avatar upload module and the forum remained working. It was when i re-installed the smilie module that the problem again presented itself.

I went through the module_smilies.php file and found that I can cure the problem by removing/comment out this section:

Code:

function assign_module_tpl()
{
   global $auu, $template;

   $template->assign_vars(array(
      'MODULE_COPYRIGHTS' => $auu->cfg['display_name'] . ' Module © 2004 Thoul'
   ));
}


I can only presume that by removing the admin_upload.php file this disabled the modules and hence allowed the admin panel to load.

So, the real culprit for the blank admin panel is infact the module not AUU itself, is there any fix to the above code that would cure the problem or am i safe to leave it out?

Again, thanks for your help thus far

Regards

Yan
 

Thoul
Administrator

Thu Jul 13, 2006 9:31 pm   Post subject: re: Admin Upload Utility - Blank Admin panel
Hm, I certainly wouldn't have expected that part to cause this, but I'm glad you were able to track down the cause. That section just displays my copyright on the admin pages, so it's not vital. If you replace it with this, then things should work fine:

Code:

function assign_module_tpl()
{
}


If there are still problems, removing it entirely should be fine, too. You might get an error about the assign_module_tpl() function not existing in that case, but if not then I would go with that.
 

Page 1 of 1
Display posts from previous: