400 & 500 Error Pages
Posted: 06 Jun 2011, 22:26
I added the 400 & 500 Error Pages to the mod the other day on my install, if anyone wants these edits, let me know and I'll go dig them out for you
Database and Demo for phpBB3 BBCodes, Mods and Smilies
https://phpbb3bbcodes.com/
Previously when my host were doing a lot of upgrades, all php sites got 500 internal server errors, and it ran the error page fine, it just would'nt let you go anywhere else, lolStoker wrote:Some of the error pages cant be controlled by phpBB.
I am not 100% sure about the 400 bad request, but the 500 internal server error page will not be displayed because it is impossible to display any phpBB page when there is an internal server error.
Code: Select all
ErrorDocument 401 /error.php?mode=401
Code: Select all
ErrorDocument 400 /error.php?mode=400
Code: Select all
ErrorDocument 404 /error.php?mode=404
Code: Select all
ErrorDocument 500 /error.php?mode=500
Code: Select all
case '401':
page_header($user->lang['ERROR_TITLE401']);
$template->set_filenames(array(
'body' => 'error/401_body.html')
);
break;
Code: Select all
case '400':
page_header($user->lang['ERROR_TITLE400']);
$template->set_filenames(array(
'body' => 'error/400_body.html')
);
break;
Code: Select all
case '404':
page_header($user->lang['ERROR_TITLE404']);
$template->set_filenames(array(
'body' => 'error/404_body.html')
);
break;
Code: Select all
case '500':
page_header($user->lang['ERROR_TITLE500']);
$template->set_filenames(array(
'body' => 'error/500_body.html')
);
break;
Code: Select all
'ERROR_TITLE401' => '401 Authorization Required',
Code: Select all
'ERROR_TITLE400' => '400 Bad Request',
Code: Select all
'ERROR_TITLE404' => '404 Not Found',
Code: Select all
'ERROR_TITLE500' => '500 Internal Server Error',
Code: Select all
'ERROR_AUTH_REQUIRED' => 'This server could not verify that you are authorized to access the document requested.',
Code: Select all
'ERROR_BAD_REQUEST' => 'Your browser sent a request that it could not understand.',
Code: Select all
'ERROR_NOT_FOUND' => 'The requested resource could not be found but may be available again in the future.',
Code: Select all
'ERROR_SEVER_ERROR' => 'The server encountered an internal error or misconfiguration and was unable to complete your request.',
maybe, and oops I forgot that edit will add that nowStoker wrote:Thanks, I will check it out.
Maybe the "problem" at my server is that it is set up to use custom error pages.
No Problemdarkonia wrote:thx stoker and ashley!