This function displays a blank page with a "No input file specified" instead of my personal 404 page, someone could help me to recode it so it just returns the 404 to have my custom error page displayed correctly ? This is withint sapi/cgi/cgi_main.c a PHP-CGI function. Thans for the help.PHP Code:if (retval == FAILURE && file_handle.handle.fp == NULL) {
if (errno == EACCES) {
SG(sapi_headers).http_response_code = 403;
PUTS("Access denied.\n");
} else {
SG(sapi_headers).http_response_code = 404;
PUTS("No input file specified.\n");
}
ps: I have tested by commenting out PUTS(... but it displays only a blank pages even if I see the return status code was 404.


LinkBack URL
About LinkBacks





Reply With Quote