MyBB Community Forums

Full Version: Fatal error: Cannot redeclare build_plugin_list()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have no clue what i did wrong.  I installed some plugins then i started getting this error when i try to go to plugins in ACP.  I deleted the plugins and its still there.

MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.
MyBB Internal: One or more warnings occurred. Please contact your administrator for assistance.

Fatal error: Cannot redeclare build_plugin_list() (previously declared in /home/hakshack/public_html//modules/config/plugins.php:620) in /home/hakshack/public_html//modules/config/plugins.php on line 620
Looks like you are using a function called build_plugin_list().
We have a core function with the same name already, hence the name conflicts.

If this is a custom function (either core edit or plugin); rename the function to something else ...
Well, I think the plugins.php file is called twice. Looks like a core edit if there is no more plugin file.
Or probably a required_once (or include_once) replaced with a required (or include).
(2019-12-16, 12:28 PM)Crazycat Wrote: [ -> ]Well, I think the plugins.php file is called twice. Looks like a core edit if there is no more plugin file.
Or probably a required_once (or include_once) replaced with a required (or include).
How do i check this and if this is the problem how do i remedy it.  Im no dummy but please keep in mind i am a beginner.

i found build_plugin_list 3 times in plugins.php... Im assuming this is supposed to be this way. So i have to find the .php file that is also calling this function?? how do i do this??
If you have a downloaded mirror of your forum, and you are running a linux box, you could use terminal command line to change to the forum directory, then 'grep -r build_plugin_list'
Something is strange:
Quote:Fatal error: Cannot redeclare build_plugin_list() (previously declared in /home/hakshack/public_html//modules/config/plugins.php:620) in /home/hakshack/public_html//modules/config/plugins.php on line 620
the plugins.php file is usually in admin/modules/config/ (so it gives /home/hakshack/public_html/admin/modules/config/plugins.php), you may have a trouble somewhere.
And it's normal if you have 3 times the "word" build_plugin_list:
- call of the function line 554
- call of the function line 570
- declaration of the function line 618
Your trouble is line 620, so your file has been modified.
Usually this kind of error is a sign of corrupted core files. Please try running the File Verification tool in the ACP at ACP > Tools & Maintenance > File Verification. If any of the core files show as having been modified and you know you didn't modify them yourself, I'd advise replacing the files with copies from a fresh download of MyBB.
(2019-12-17, 10:10 AM)Euan T Wrote: [ -> ]Usually this kind of error is a sign of corrupted core files. Please try running the File Verification tool in the ACP at ACP > Tools & Maintenance > File Verification. If any of the core files show as having been modified and you know you didn't modify them yourself, I'd advise replacing the files with copies from a fresh download of MyBB.
I just tried to replace plufgins.php with a fresh copy but the problem is still therre!

I was due for an upgrade so i upgraded to 1822 and this is the error i get now.

Fatal error: Cannot declare class pluginSystem, because the name is already in use in /home/hakshack/public_html/inc/plugins/class_plugins.php on line 9
^ that class_plugins.php file should be in inc folder - not in plugins subfolder
(2020-01-17, 02:03 PM).m. Wrote: [ -> ]^ that class_plugins.php file should be in inc folder - not in plugins subfolder
That file is in the inc folder.  Man im stumped
Pages: 1 2