httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52403] New: FallbackResource doesn't work for non-existent PHP files in webroot
Date Sat, 31 Dec 2011 00:33:19 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52403

             Bug #: 52403
           Summary: FallbackResource doesn't work for non-existent PHP
                    files in webroot
           Product: Apache httpd-2
           Version: 2.2.20
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dir
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: parry@plarry.com
    Classification: Unclassified


Server info:

Linux ubuntu-server 3.0.0-14-server #23-Ubuntu SMP Mon Nov 21 20:49:05 UTC 2011
x86_64 x86_64 x86_64 GNU/Linux
Server version: Apache/2.2.20 (Ubuntu)
PHP 5.3.6-13ubuntu3.3 with Suhosin-Patch (cli) (built: Dec 13 2011 18:18:37) 

I am using the default apache website except that I have the "FallbackResource
/index.php" configured under <Directory /var/www/>. The fallback to the
index.php seems to work great EXCEPT when I request a non-existent PHP file
from the webroot directory. Any other file extension works fine in the webroot
but any filename with the .php extension gets a 404 error response. If I call
that non-existent PHP file from a bogus/non-existent directory, it works.

For example:
GET /a.php <--404 Error
GET /bogus/a.php <--Falls back to /index.php
GET /a.html <--Falls back to /index.php

See output below:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /a.php HTTP/1.1
HOST: localhost
Connection: close

HTTP/1.1 404 Not Found
Date: Sat, 31 Dec 2011 00:21:54 GMT
Server: Apache/2.2.20 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 278
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /a.php was not found on this server.</p>
<hr>
<address>Apache/2.2.20 (Ubuntu) Server at localhost Port 80</address>
</body></html>
Connection closed by foreign host.


Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /nodir/a.php HTTP/1.1
HOST: localhost
Connection: close

HTTP/1.1 200 OK
Date: Sat, 31 Dec 2011 00:22:11 GMT
Server: Apache/2.2.20 (Ubuntu)
X-Powered-By: PHP/5.3.6-13ubuntu3.3
Vary: Accept-Encoding
Content-Length: 25
Connection: close
Content-Type: text/html

/nodir/a.php
localhost
Connection closed by foreign host.



Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /a.html HTTP/1.1 
HOST: localhost
Connection: close

HTTP/1.1 200 OK
Date: Sat, 31 Dec 2011 00:32:38 GMT
Server: Apache/2.2.20 (Ubuntu)
X-Powered-By: PHP/5.3.6-13ubuntu3.3
Vary: Accept-Encoding
Content-Length: 20
Connection: close
Content-Type: text/html

/a.html
localhost
Connection closed by foreign host.


Thanks,
Parry

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message