Welcome Guest, Not a member yet? Register   Sign In
404 error page showing instead of real error
#1

[eluser]careybaird[/eluser]
I have a controller method that is fairly complex - it is importing data from an external feed, looping through it and performing various actions.

There is a problem somewhere, but instead of showing the error I am being shown the 404 Page Not Found error. I know it is not a real 404 error, as removing sections of the code makes it work properly.

In what situations would a 404 error show? How can I disable this so I can see exactly what is going on?

I thought it might be a script timeout, but this doesn't seem to be the case from my tests.

Thanks guys!
#2

[eluser]mddd[/eluser]
CodeIgniter shows a 404 error if the controller/method is not found. Or if you try to load a view
So it could be that you are redirecting to a controller/method combination that does not exist?
Once the controller is executing properly, you should not get 404 errors.
#3

[eluser]careybaird[/eluser]
Thanks mddd. The controller/method is definately found and it doesn't get as far as loading the view. I know the view exists. There are no redirects in it.

If I remove a large chunk of the code it works fine and loads the view. But something in the code is causing the 404 - some kind of error.

Would it show a 404 instead of a timeout? i.e. if the script was stuck in an infinite loop
#4

[eluser]John_Betong[/eluser]
Take a look in your ./application/config/config.php file and set your error logging and view the reports.

The log file is very informative and should help in tracking your script errors.

You could also manually set some start and end break-points in your the dodgey script using: log_message('level', 'message');
 
 
 
#5

[eluser]careybaird[/eluser]
That is brilliant, thanks John_Betong

The log file told me that it is looking for an internal_error_html file:

ERROR - 2010-06-29 06:10:16 --> 404 Page Not Found --> internal_error_html

So that is the right direction, I should be able to solve it.

Thanks again!




Theme © iAndrew 2016 - Forum software by © MyBB