CodeIgniter Forums
Cannot redeclare class CI_Exceptions - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Cannot redeclare class CI_Exceptions (/showthread.php?tid=40316)



Cannot redeclare class CI_Exceptions - El Forum - 04-05-2011

[eluser]shane_[/eluser]
I've suddenly started getting a fatal error involving 'Cannot redeclare class CI_Exceptions.' The application has been running for about a year without any issues. It turns out that I had extended the Exceptions class several months ago. So when I removed the subclass the issue goes away. I'm not sure what has changed recently, anyone know what could have brought this on suddenly? It's CI version 1.7.2.


Cannot redeclare class CI_Exceptions - El Forum - 04-05-2011

[eluser]InsiteFX[/eluser]
What has changed on your server?

Different PHP version like maybe an upgrade to PHP 5+?

InsiteFX


Cannot redeclare class CI_Exceptions - El Forum - 04-05-2011

[eluser]shane_[/eluser]
We've always been at PHP 5. I'm checking right now to see if sys admin updated lately. Can't imagine that causing an issue with this though.


Cannot redeclare class CI_Exceptions - El Forum - 04-05-2011

[eluser]InsiteFX[/eluser]
If you have always been on PHP 5 then you are right it should still work!

Maybe one of your files got corrupted!

Also check to see if there where any permission changes on directories and files!

Check your index.php to see if a hacker got in.

InsiteFX


Cannot redeclare class CI_Exceptions - El Forum - 04-13-2011

[eluser]duellsy[/eluser]
@_shane figure out the issue? I'm having the same problem that's just popped up... not sure what's goin on


Cannot redeclare class CI_Exceptions - El Forum - 04-14-2011

[eluser]shane_[/eluser]
I have not figured it out. After further investigation I discovered that the issue goes back to around the time that I extended CI_Exceptions. So it's not something that just suddenly started. The problem that was causing the exception just became more frequent. If you google 'cannot redeclare class CI_Exceptions' you'll see a lot of sites showing this error (apparently they failed to turn off error reporting). So my guess is that it is an issue with extending this class in this version of CI. I don't really have time to dig any further right now. Maybe somebody that knows the workings of CI better than I do has an idea.