|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-08 06:58 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
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) ; ?>