404 shows a blank page |
[eluser]gRoberts[/eluser]
Any idea's anyone? It seems to be related to my web host as I have now got two CI projects running on the same host with the same issue. Cheers Gav
[eluser]emily87[/eluser]
Could be to do with your .htaccess file if you're using one. What happens if you remove/comment out Code: <?php header("HTTP/1.1 404 Not Found"); ?>
[eluser]gRoberts[/eluser]
I'm using the stock .htaccess file as suggested by the user guide (http://ellislab.com/codeigniter/user-gui.../urls.html) Code: RewriteEngine on As for the error_404.php file, it does not contain that code. Just FYI, I'm running 1.7.2. My show_404 code: Code: function show_404($page = '') show_error: Code: function show_error($heading, $message, $template = 'error_general', $status_code = 500) The first line of show_error seems to be causing the error. If I place a die before set_status_header($status_code); it will throw an error that i am outputting before headers have been sent and then show my 404 page below. Also, FYI, i haven't changed any of the system files or any of the error pages. Cheers Gavin
[eluser]gRoberts[/eluser]
I take it no one knows why this is happening? By commenting out set_status_header it works. But this won't send correct 404 headers. Any idea's? Cheers Gavin
[eluser]ciKD[/eluser]
I ran into a similar problem with 1.7.2 and tests to customize db-error-output, no solution found so far, might be same reason? [SOLVED, was different reason, see posting] Posting: As soon as I add header(‘Content-Type: application/x-json; charset=utf-8’); nothing seems to be sent As a sidenote, in Exceptions.php, why is $heading not used at all in function show_error($heading, $message, $template = 'error_general', $status_code = 500) ? [SOLVED, of course it is used, in include().. ] |
Welcome Guest, Not a member yet? Register Sign In |