I have an Apache/Linux web server hosting a website. Most of the pages are in PHP. The site was working fine until a couple of weeks ago. I have a Search page on the site ('search.php') that submits to another page called 'results.php'. The actual Select SQL query for the search runs on 'results.php' and the results are displayed on this page. Recently, one of the developers made some changes to the 'results.php' page and uploaded it. Since then, the rest of the site works fine, other search queries work fine (on other pages) but each time we submit a search on 'search.php', we get the following error message: Forbidden You don't have permission to access /results.php on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. I even uploaded the previous copy of the file from my machine but it still gives the same error. I have checked the file permissions, the ownership, etc but I can't seem to figure out what's causing the problem. I read on some forum that the file should be readable by apache. My current user and group are both apache. Thanks...
Can you check the apache error logs? (probably at /var/log/httpd/) Is "ErrorDocument" defined fine in apache conf?
Here are the ErrorDocument-related lines I see in httpd.conf. They are all commented: # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var What should I do? Why was it working before?
Did you check your error.log to see if anything related to your problem had been logged? Check .htaccess file, Directory sections in httpd.conf? Which Linux is it? Maybe Fedora Core? Maybe is it problem with SELinux policy? (check h t t p : // fedoraproject.org/wiki/SELinux - sorry no active links) Can you give us URL of website?