RE: [PHP] Trouble getting $HTTP_RAW_POST_DATA

From: Date: Fri, 01 Aug 2003 13:22:39 +0000
Subject: RE: [PHP] Trouble getting $HTTP_RAW_POST_DATA
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157930@lists.php.net to get a copy of this message
You should encase the $HTTP_RAW_POST_DATA in print_r() or you will just get the word "Array" printed. But I doubt that will solver your problem because it seems that $HTTP_RAW_POST_DATA is empty. Also, print_r() does not include any HTML formatting, so you will need to look at the source for the page in the browser to make it readable. -----Original Message----- From: Balazs Halasy [mailto:bh@ez.no] Sent: Friday, August 01, 2003 7:28 AM To: php-general@lists.php.net Subject: [PHP] Trouble getting $HTTP_RAW_POST_DATA I need to have the contents of $HTTP_RAW_POST_DATA because of non-regular uploads (from browser to my home-made WevDAV server implementation (done in PHP)). However, no matter what I do, it is always NULL. I guess the following script should return SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is added to the php.ini file (and yes, I've restarted apache :-)... so, why is it empty and how can I get the RAW post data? My PHP version is 4.3.2. test.php: <form action="<?echo($PHP_SELF)?>" method="post"> <input type="text" value="you-suck"> <input type="submit"> </form> <?php echo("Raw post data: ".$HTTP_RAW_POST_DATA."<br>\n"); echo("Raw post data decoded: ".base64_decode($HTTP_RAW_POST_DATA)."<br>\n"); echo("<hr>"); phpinfo(); ?> Allman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#157930) next »