Welcome Guest, Not a member yet? Register   Sign In
404 shows a blank page
#1

[eluser]gRoberts[/eluser]
Afternoon all,

For some reason my 404 pages are not showing the default 404 template.

Instead it shows a completely blank page.

This happens when you go to a route that doesn't exist or you call show_404.

Any idea's?

Cheers

Gavin
#2

[eluser]gRoberts[/eluser]
Anyone?
#3

[eluser]kikz4life[/eluser]
use firebug for debugging or log errors, this way you'll be able to identify the real problems.

cheers
-Dean
#4

[eluser]gRoberts[/eluser]
The log see's it's 404'ing.. So it's not something I'd done intentionally.

Although your reply was useful, does anyone else have any solutions that do not involve installing software?

Cheers Dean,

Thanks

Gavin
#5

[eluser]kikz4life[/eluser]
do you use .htaccess? i think you already what causing this error. Redirecting to a page that doesn't exist will sure cause an error. Could you explain more about your problem and also your setup in CI.

cheers
-Dean
#6

[eluser]gRoberts[/eluser]
Dean,

Thanks again for getting back to me.

I am using .htaccess and everything works great apart from when I try going to a page that doesn't exist or use the show_404 method, it simply shows a blank page.

Nothing appears in the log to suggest an error has occurred, as shipped error reporting and display_errors is turned on and to the max.

The only thing that MAY! be causing it is that my system folder is outside of the htdocs folder. This has not been a problem before?

Thanks again

Gavin
#7

[eluser]Jamie Rumbelow[/eluser]
Interesting, Gavin. Try adding a die() message to the show_404() function in the system/codeigniter/CodeIgniter.php folder to make sure that error is being called. Let me know if it appears!

Jamie
#8

[eluser]gRoberts[/eluser]
Evening Jamie.

Thanks for the head start.

show_404 in system/codeigniter/Common.php is being called.

It seems that when setting the http status code via set_status_header($status_code); (CI_Exceptions->show_error) the browser stops sending data.

I placed a die within the show_404 before the exceptions class is called and it works.
I place a die after the set_status_header($status_code); and I get nothing.

Thanks again Jamie.

Cheers

Gavin
#9

[eluser]Jamie Rumbelow[/eluser]
What's your server configuration? It seems that you're having an issue with sending the 404 error. I've got no idea what, though.

Jamie
#10

[eluser]gRoberts[/eluser]
I am running on a domain that was created on a Fasthosts reseller account.

Whilst trying to get the phpinfo, I decided (since I was on the page) that I'd stick it in the show_404 method and at the bottom, I had the generic error when you output data before sending headers and directly underneath was my 404 page Wink

Weird Sad

I've attached the HTML output I received. - http://sharesend.com/unkjs (sorry about uploading it to some crappy file service but CI's forum won't let me upload it)

For security purposes i have had to remove information regarding the domain/ip address etc. I hope you understand.

Thanks again Jamie!

Gavin




Theme © iAndrew 2016 - Forum software by © MyBB