FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » $_POST not set on 404
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: $_POST not set on 404 [message #173053 is a reply to message #173052] Sat, 19 March 2011 07:46 Go to previous messageGo to previous message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma:
Senior Member
Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:

> 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 it's an apache issue, eh? Yes, the request_method is set to "GET"
when my code receives control, something else (redirect_method or
somesuch) is set to POST.

> So, since PHP does not receive a $_POST request, there is no $_POST data
> to process.

At least that makes some sense, thanks; maybe I can fish around and
dig it up knowing who last had it. Any idea whether apache kept the
data that came as a result of the POST action, or did it just throw it
on the floor?

> 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.

Answered in aww. Thanks for the "look at apache data" clue, I'll
check it out.

--
no aluminum siding offers today
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pipe the content of a variable to a process
Next Topic: Confused about a MySQL Statement
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 15:34:47 GMT 2024

Total time taken to generate the page: 0.03371 seconds