Welcome Guest, Not a member yet? Register   Sign In
Cannot redeclare class ci_exceptions... on line 27
#1

[eluser]Unknown[/eluser]
I don't know if it is a bug, but after upgrade to codeigniter 1.7.2 I get this message on several pages that works fine with v. 1.7

Quote:Fatal error: Cannot redeclare class ci_exceptions in /home/tgp/webhost/xyz/system/libraries/Exceptions.php on line 27

I found that may be is a bad programing technic for my own, but the sistem should show me the show_error('message').

I have to disable all the show_error on my pages to avoid this.

How can I fix it to works ok???
#2

[eluser]CroNiX[/eluser]
Ive never gotten that error in 1.7.2. Problem is probably in your code, why don't you post it?
#3

[eluser]SneakyDave[/eluser]
FYI, I started getting this error trying to port a CI PHP4 application to PHP5. All that was changed in the code was changing the views from using the PHP short tags (<?) to the more recommended full tags (<?php) because short tag support was turned off on the PHP5 installation.

It might have something to do with the controllers constructor method, since it works different between PHP4 and PHP5? I don't know. If I find something out, I'll post about it.
#4

[eluser]SneakyDave[/eluser]
I can confirm that if I change the constructor of the controller from something like this for PHP4
Code:
function ControllerName()

To this for PHP5:
Code:
function __construct()

That the error doesn't appear.
#5

[eluser]CroNiX[/eluser]
Good deal. You can also still use short tags if you want (even if php.ini disallows it) by enabling the short tags in config.php. CI will internally rewrite them to full tags when parsing. It will add a little extra load on the server though.




Theme © iAndrew 2016 - Forum software by © MyBB