ID: 41783 Updated by: [EMAIL PROTECTED] Reported By: gs06897 at yahoo dot com -Status: Open +Status: Bogus Bug Type: URL related Operating System: linux and windows PHP Version: 4.4.7 New Comment:
This is normal behaviour and known as PATH_INFO. Thousands of sites out there rely on it heavily and it is working exactly as it should. If you don't want PATH_INFO URLs to work on your server, turn them off in your Apache config or check for them in your PHP code. Apache2 has an AcceptPathInfo directive that controls this. Previous Comments: ------------------------------------------------------------------------ [2007-06-22 23:05:53] gs06897 at yahoo dot com Description: ------------ URLs like: http://www.mywebsite/mypage.php/mypage.php produce a mangled version of the 'mypage.php' page where 'mypage.php' is not a directory containing a page called 'mypage.php', but where 'mypage.php' is a real and accessible php script on the web site. Please don't hit the following URL frequently as the mangled pages are destroying us in bandwith usage: http://www[dot]seaoftranquility[dot]org/reviews.php/reviews.php Sorry about the [dot] edit. Actually, it doesn't really matter what you type after the last slash. Somehow PHP is realising that there is a page called 'reviews.php', or whatever--as long as the page is valid--and trying to return the page, but not being terribly successful about it. It's like the 'directory' cyclically resolves the script, but them PHP gets throroughly confused about what to serve. The header returned is 200 (Ok), and this is what becoming a problem with search engines linking to the bad URLs. I've been able to produce this on three different versions of PHP, and on servers running two different versions of Apache and PHP on Linux, as well as a Microsoft IIS server with PHP. All using different web sites and different PHP code. Truly non-existent pages are correctly rejected with 404 Not Found. Expected result: ---------------- 404 Not Found should be sent in the header, instead of PHP sending a partial page. Actual result: -------------- Web server returns status 200 (Ok) along with PHP decoding and producing only a partial, mangled version of the actual PHP-generated page. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41783&edit=1