MyBB Community Forums

Full Version: Plugin page error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have some how managed to brake the plugin page in the Admin CP and get this error:
Quote:Fatal error: Cannot redeclare is_super_admin() (previously declared in /home/admin/domains/rollercoastermad.com/public_html/forum/inc/functions.php:5529) in /home/admin/domains/rollercoastermad.com/public_html/forum/admin/adminfunctions.php on line 2383

I will try and tell you what happened as best as i can.

I have a plugin called Advanced Forum Signatures, and he released an update from 2.0.3 to 2.0.4 so i downloading it off his post on the forum.
And then uploaded it to the server and then noticed it had not changed and myBB still said it was 2.0.3 so i checked the file i had downloaded of his post and checked it and it said in the plugin file 2.0.3 so he must had forgot to update that value so i changed it as i thought that can't do much, and then F5 the pluging page in the admin and bame that error came up. Sad

I have uploaded the whole of the inc folder from a back up this yesterday but that did not work and the error still there.


What else can i do to fix it?
Open up ./admin/adminfunctions.php and find the is_super_admin function. Write it so that you wrap function_exists around it:

if(!function_exists('is_super_admin'))
{
	function is_super_admin()
	{
		// The code
	}
}
Hate to be a party pooper but I wouldn't do that Toungue

The problem is ./admin/adminfunctions.php, this isn't even a 1.6 file, that's left over from 1.2. Delete that and you should be golden.
well i have done that and it brough up even more errors it seams that something gone horrbily wrong Sad

Warning [2] require_once(/home/admin/domains/rollercoastermad.com/public_html/forum/admin/adminfunctions.php) [function.require-once]: failed to open stream: No such file or directory - Line: 27 - File: admin/global.php PHP 5.2.10 (Linux)
File Line Function
/admin/global.php 27 errorHandler->error
/admin/global.php 27 require_once
/inc/plugins/signature.php 24 require
/admin/modules/config/plugins.php 477 require_once
/admin/index.php 483 require


Fatal error: require_once() [function.require]: Failed opening required '/home/admin/domains/rollercoastermad.com/public_html/forum/admin/adminfunctions.php' (include_path='.:/usr/local/lib/php') in /home/admin/domains/rollercoastermad.com/public_html/forum/admin/global.php on line 27

[Image: servererors.jpg]
Delete your admin folder and reupload it; make sure you also reupload any files that plugins add to the admin folder. ./admin/adminfunctions.php has not been in MyBB for over two years, and neither has ./admin/global.php which is also mentioned in that error. I can't see how you've not had these problems before.
Done all that and now is all fixed thank you Smile
Very strange. I would have thought that a plugin was still including those files, hence the error. What's the "signature.php" file Ryan? The errors originated from there it seems...
its from a plugin called Advanced Forum Signatures, sadly that signature.php file should of been on the root of the forum and it seams that it got in the wrong place must of been a mistake i made :/

But the plugin as not correct anyway loads of thing dont work on it :/ so i will take it up with the plugin maker now.
(2010-09-15, 12:37 PM)ryansstuff Wrote: [ -> ]sadly that signature.php file should of been on the root of the forum and it seams that it got in the wrong place must of been a mistake i made :/

There's the problem. Toungue

The Plugins page will take all files in the folder and include them, and that will mess up the page if the file is trying to include a file that doesn't exist. It doesn't exist because you've put it in the wrong place.

Replacing all your admin files would haven't have made any difference, but at least you know you're running the latest ones. Shy