Welcome Guest, Not a member yet? Register   Sign In
Extending CI_Exceptions is not working?

Hi, I want to override the show_404 function in the CI_Exceptions.
It's working in my 2 local servers(Apache) but it's not working in my live server(LiteSpeed).

Is this Codeigniter bug or LiteSpeed restrictions?
Other classes and models that I've extended are working, it's just the CI_Exceptions doesn't work..

However, If I replace the core class entirely, it works.


[eluser]Nigey B[/eluser]

Did you ever find an answer to this one as I have exactly the same issue. Works fine on my local server but the moment I upload the files the My_Exceptions class gets ignored completely?

Is the file name actually capitalized? /application/core/MY_Exceptions.php? Some os's are case sensitive.

This is why it's best to use a virtual machine to develop on where the OS and setup is identical to the production server. You don't run into problems like "works on development but not production server".

Edit: MY_Exceptions must be capitalized like that in the class definition as well as the filename.

class MY_Exceptions extends CI_Exceptions... (you have a lower-case y in My)

[eluser]Nigey B[/eluser]
CroNix you hit the nail right on the head. Spot on. Thank you.

Theme © iAndrew 2016 - Forum software by © MyBB