Welcome Guest, Not a member yet? Register   Sign In
Error "Cannot redeclare class"
#1

[eluser]Unknown[/eluser]
Hello everyone, I have a codeigniter app that has been happily humming along for a few years now but has recently started to act up. The errors first manifested themselves as "Cannot redeclare class" errors, to which I changed some previously fine code from, require to require_once this seemed to solved for now. After that was cleared up I started having problems with this line from Router.php $this->config =& load_class('Config'); where the config class was not being loaded and subsequent calls to $this->config were being met with errors. I were able to work around this by trying to insure the config is loaded by doing while (!$this->config =& load_class('Config')); While this seems to be working for now, I'm looking more for why this happened and how to fix rather than this work around. Any help would be much appreciated. Thanks!
#2

[eluser]pickupman[/eluser]
If it a few years old, what version of CI are you running? It may be an issue that the server configuration/php has been updated and breaking your previously working code.
#3

[eluser]Unknown[/eluser]
Using the newest version of CI. We did have a server move recently, but those errors didn't show up right after the server move. You have any suggestions of where to look as far as configuration problems?
#4

[eluser]pickupman[/eluser]
Recent version as in CI 2.0dev or 1.7.2? Either way, have you extending the Config class? Some of the core class need to be moved into application/core in 2.0 when extending them.




Theme © iAndrew 2016 - Forum software by © MyBB