Edit report at https://bugs.php.net/bug.php?id=38094&edit=1

 ID:                 38094
 Comment by:         wahlerit at gmail dot com
 Reported by:        mdcore at gmail dot com
 Summary:            Custom 404 does not receive POST variables
 Status:             Not a bug
 Type:               Bug
 Package:            IIS related
 Operating System:   win32
 PHP Version:        5.1.4
 Block user comment: N
 Private report:     N

 New Comment:

I have encountered this issue working with a LAMP server running PHP. No 
presence 
of Microsoft's IIS.

Custom 404 pages do not seem to receive POST variables. In any URL encoded 
variables present do not get declared and $_SERVER["QUERY_STRING"] is empty. 
The 
query string however can be determined by looking at $_SERVER["REQUEST_URI"] 
which does come through. It seems that PHP is receiving the information but for 
some reason unknown to me, failing to parse it.

Has anyone been able to figure out how to resolve this?


Previous Comments:
------------------------------------------------------------------------
[2007-08-15 08:31:00] j...@php.net

It's hard for PHP to mangle those variables since it sets them to whatever IIS 
says them to be. So obviously you can't POST to custom 404 anymore. You should 
use $_REQUEST to refer to variables passed in such cases where you can't be 
sure where they come from. ;)

IIS bugs are not PHP bugs -> bogus.

------------------------------------------------------------------------
[2006-09-18 20:41:27] dangos at gmail dot com

I have confimed this issue, and it _is_ a PHP bug. When presented with an HTTP 
POST through an IIS 6 custom error handler, PHP receives the raw POST data into 
php://input, but fails to parse it into $_POST etc.

For comparison, ASP scripts do receive POST variables from IIS 6 custom error 
handlers, whereas PHP scripts do not. PHP also mangles $_SERVER['QUERY_STRING'] 
and $_GET and incorrectly reports $_SERVER['REQUEST_METHOD'] as 'GET' in this 
situation.

I can suggest that the likely reason for the above problems is that when 
presenting a custom error to a script ISAPI filter IIS6 prepends the error 
status code to the beginning of the URL (e.g. 404;http://www.example.com/) - 
this odd format is possibly causing confusion when PHP attempts to process the 
server variables.

------------------------------------------------------------------------
[2006-07-13 12:57:46] mdcore at gmail dot com

Thanks for responding so quickly Tony!

I think it is a bug in the PHP ISAPI filter because if I use a custom 404 ASP 
page then the POST variables do come through. It's only with PHP pages that it 
does not work.

------------------------------------------------------------------------
[2006-07-13 12:53:30] tony2...@php.net

It clearly DOES pass them, as you said it yourself:
>this works in IIS5 but not in IIS6. 
Please report it to Microsoft.

------------------------------------------------------------------------
[2006-07-13 12:47:44] mdcore at gmail dot com

Why is the PHP ISAPI filter not passing the POST variables to the script?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=38094


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=38094&edit=1

Reply via email to