Thanks, but it's not the point, I think.
Because from aaa.php --> error.php is redirected by Apache.
The error.php could not get the POST data via $HTTP_RAW_POST_DATA.

If aaa.php send POST data to a existing file , say ccc.php,
of course we can get $_POST, $HTTP_RAW_POST_DATA in ccc.php,

But if aaa.php send POST data to a non-existing file , say bbb.php,
The apache redirects to error.php
(Via the mirror site setting : ERROR 401 /error.php in httpd.conf)
Thus the error.php can get some REDIRECT_XXXX variables,
but not $_POST, nor $HTTP_RAW_POST_DATA.

So the session does not work in this case.

Best Regards,
CCJ

> GET data is passed in the URL, POST data is not so loss of the
> information would be expected.  It sounds like you should use sessions,
> it is a better way of passing data between pages.
>
> Take a look at http://www.php.net/manual/en/ref.session.php
>
> Jason
>
>
> ccj wrote:
>
> >Hi all
> >
> >Based on descriptions in /urlhowto.php  -- Get it on your site,
> >I tried to redirect GET/POST data to a third page, say,
> >
> >aaa.php ---> error.php ---> bbb.php
> >====
> >aaa.php:
> >    <form action="unknown.php" method="GET">
> >    ....
> >====
> >error.php:
> >    <?
> >    $QSTRING = $_SERVER['REDIRECT_QUERY_STRING'] ;
> >    ....
> >    Header("Location: bbb.php?" . $QSTRING) ;
> >    ?>
> >====
> >Everything goes right with GET method, but POST goes wrong in error.php:
> >
> >The $HTTP_RAW_POST_DATA is lost.
> >The error.php page could not get the posted data.
> >
> >Any idea ?
> >
> >Regards,
> >CCJ
> >
> >
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to