Bluehost.com Web Hosting $6.95

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

This is a discussion on Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA within the PHP General forums, part of the PHP Programming Forums category; Balazs Halasy wrote: > I need to have the contents of $HTTP_RAW_POST_DATA because of > non-regular uploads (from browser ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-01-2003
John W. Holmes
 
Posts: n/a
Default Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

Balazs Halasy wrote:
> 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.


Is register globals ON or OFF? Either way, maybe try
$_SERVER['HTTP_RAW_POST_DATA']...

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com




Reply With Quote
  #2 (permalink)  
Old 08-01-2003
Baroiller Pierre-Emmanuel
 
Posts: n/a
Default Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

Hi,
$HTTP_RAW_POST_DATA is an array...
with echo you'll only get "array"..

To get something into $HTTP_RAW_POST_DATA, you need to "submit" your form
before...

Your script will only display something if you post the form before.

Regards,
P.E. Baroiller


"John W. Holmes" <holmes072000@charter.net> a écrit dans le message de
news:3F2A5E0C.5070004@charter.net...
> Balazs Halasy wrote:
> > 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.
>
> Is register globals ON or OFF? Either way, maybe try
> $_SERVER['HTTP_RAW_POST_DATA']...
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals - www.phparch.com
>
>
>
>



Reply With Quote
  #3 (permalink)  
Old 08-01-2003
Mike Migurski
 
Posts: n/a
Default Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

>$HTTP_RAW_POST_DATA is an array...
>with echo you'll only get "array"..


No, it's a string - just the raw bytes that were posted.

>> Is register globals ON or OFF? Either way, maybe try
>> $_SERVER['HTTP_RAW_POST_DATA']...


Also, ensure that "always_populate_raw_post_data" is on, too - see:
http://www.php.net/manual/en/configu...directives.php

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0