[SOLVED]Fatal error: Cannot redeclare FileIcon()[SOLVED]

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
aldtsjerk
Forum Members
Forum Members
Posts: 21
Joined: Tue Oct 15, 2013 10:28 am

[SOLVED]Fatal error: Cannot redeclare FileIcon()[SOLVED]

Post by aldtsjerk »

Hello,

Using cmsms 1.11.4.

After adding the plugin file_listing to the folder Plugins a error message
appears everytime I try to open the Pluginlist in m admin. This is the error message. The plugin file_list is also installed.

"Fatal error: Cannot redeclare FileIcon() (previously declared in /var/www/vhosts/xxxxxxxxxxx.nl/httpdocs/plugins/function.file_listing.php:406) in /var/www/vhosts/xxxxxx.nl/httpdocs/plugins/function.file_list.php on line 158"



Any idea on what couses this?
Last edited by aldtsjerk on Mon Feb 03, 2014 12:06 pm, edited 1 time in total.
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Fatal error: Cannot redeclare FileIcon()

Post by staartmees »

Readfile is disabled by some hosts. You receive an error saying "cannot redeclare function" or something similar.

also see http://dev.cmsmadesimple.org/bug/view/3794
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: Fatal error: Cannot redeclare FileIcon()

Post by Jo Morg »

aldtsjerk wrote:"Fatal error: Cannot redeclare FileIcon() (previously declared in /var/www/vhosts/xxxxxxxxxxx.nl/httpdocs/plugins/function.file_listing.php:406) in /var/www/vhosts/xxxxxx.nl/httpdocs/plugins/function.file_list.php on line 158"
It seems obvious that you cant' use both plugins on the same installation as they both declare a function with the same name. Removing one of the plugins should fix this.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
aldtsjerk
Forum Members
Forum Members
Posts: 21
Joined: Tue Oct 15, 2013 10:28 am

Re: Fatal error: Cannot redeclare FileIcon()

Post by aldtsjerk »

Hi Jo,

Thanks for the tip. It works.

You write "obvious" but how can you tell in front that this is the case. It is only after installing both plugins that you are able to find out.

Further more, there are quite some differences between the two plugins. So why give this function the same name in both cases? Inmy mind not very logical.

Thanks again.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1973
Joined: Mon Jan 29, 2007 4:47 pm

Re: Fatal error: Cannot redeclare FileIcon()

Post by Jo Morg »

aldtsjerk wrote:You write "obvious" but how can you tell in front that this is the case. It is only after installing both plugins that you are able to find out.
:) You can't. It's just obvious from the error message (hence my highlights in bold).
aldtsjerk wrote:Further more, there are quite some differences between the two plugins. So why give this function the same name in both cases? Inmy mind not very logical.
Probably different developers for each plugin and neither of them expected the other to use the same function name. There is a way to prevent that, of course, but that is a different discussion...
As it is solved, please add [Solved] to the beginning of the subject of the 1st topic. ;)
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “The Lounge”