ID: 25426 Updated by: [EMAIL PROTECTED] Reported By: ccjeagle at ms6 dot hinet dot net -Status: Open +Status: Bogus Bug Type: Apache related Operating System: FreeBSD4 PHP Version: 4.3.3 New Comment:
Apparently Apache does not redirect the post data -> not PHP bug. Previous Comments: ------------------------------------------------------------------------ [2003-09-08 02:59:17] ccjeagle at ms6 dot hinet dot net Description: ------------ Hi all I posted this on general list but got no reply. Is it a bug? Envirement: PHP-4.3.3, Apache 1.3.28 / 2.0.47 php.ini : always_populate_raw_post_data is set to ON httpd.conf : ErrorDocument 404 /error.php Now I want the error.php handle all the 404 Not Found status, especially the POST/GET data. So I created a small script named posttest.php: <!-- File : posttest.php --> <form action="nonexist.php" method="POST"> .... WITHOUT the nonexist.php, the apache REDIRECT to error.php, of course. But I could only get these variables in error.php: $_SERVER["REDIRECT_REQUEST_METHOD"]="POST" $_SERVER["REDIRECT_STATUS"]=404 With the $_POST and $HTTP_RAW_POST_DATA left EMPTY. So does the php://input . I know if I change the method to GET, the error.php script could get the GET data via $_SERVER["REDIRECT_QUERY_STRING"]. But I really need to take care of the POST method. Any idea to solve this ? Thanks. Regards, CCJ Reproduce code: --------------- <?php // File : error.php readfile("php://input") ; print_r($GLOBALS) ; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25426&edit=1