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

[eluser]Unknown[/eluser]
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.



#2

[eluser]Nigey B[/eluser]
Hello,

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?
#3

[eluser]CroNiX[/eluser]
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)
#4

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




Theme © iAndrew 2016 - Forum software by © MyBB