Re: $_POST not set on 404



On 3/18/2011 4:56 PM, crankypuss wrote:
I'm setting up a server that is completely resource-based, so every
valid request is going to be a 404-not-found as far as apache is
concerned. That's fine, it's expected and handled.

What is not fine is that when it's a form with action=POST, because
the specific resource is 404-not-found, PHP does not set the $_POST
variable.

Anybody know a way to get the information from PHP?


PHP isn't doing this - your web server is.

If you check $_SERVER['REQUEST_METHOD'] you should find PHP is receiving a $_GET request. That's what Apache does when it redirects for a 404. So, since PHP does not receive a $_POST request, there is no $_POST data to process.

Your entire setup seems screwy to me. 404 should not be "expected", whether you're using PHP or something else. It should be an error condition.

What exactly are you trying to do? There must be a better way.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Apache and php to show http request headers.
    ... Apache/PHP on ubuntu to display the http request headers. ... application proxy forwards http requests to the apache server's IP ... I have a php script to dump the headers as follows: ...
    (comp.lang.php)
  • Re: Apache and php to show http request headers.
    ... Apache/PHP on ubuntu to display the http request headers. ... where 192.168.40.1 is the apache server. ... I have a php script to dump the headers as follows: ...
    (comp.lang.php)
  • Re: Apache and php to show http request headers.
    ... Apache/PHP on ubuntu to display the http request headers. ... application proxy forwards http requests to the apache server's IP ... I have a php script to dump the headers as follows: ...
    (comp.lang.php)
  • Re: Apache and php to show http request headers.
    ... Apache/PHP on ubuntu to display the http request headers. ... application proxy forwards http requests to the apache server's IP ... I have a php script to dump the headers as follows: ...
    (comp.lang.php)
  • Re: Apache and php to show http request headers.
    ... Apache/PHP on ubuntu to display the http request headers. ... where 192.168.40.1 is the apache server. ... I have a php script to dump the headers as follows: ...
    (comp.lang.php)