access to $HTTP_RAW_POST_DATA

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

access to $HTTP_RAW_POST_DATA

zheka-2

Hello

I am converting a php script to a cake based one.

The original script is getting input from xForm post via
$HTTP_RAW_POST_DATA
However the cake based script does not see $HTTP_RAW_POST_DATA  for
some reason even though it runs on the same server.

Why would this be happening? .

thank you


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: access to $HTTP_RAW_POST_DATA

cookxyz@gmail.com

try this:

$HTTP_RAW_POST_DATA = file_get_contents('php://input');


On Nov 9, 12:17 am, "zheka" <[hidden email]> wrote:

> Hello
>
> I am converting a php script to a cake based one.
>
> The original script is getting input from xForm post via
> $HTTP_RAW_POST_DATA
> However the cake based script does not see $HTTP_RAW_POST_DATA  for
> some reason even though it runs on the same server.
>
> Why would this be happening? .
>
> thank you


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: access to $HTTP_RAW_POST_DATA

chwagssd
In reply to this post by zheka-2

I found this at
http://www.phpbuilder.com/board/showthread.php?t=10304087 , hope it
helps.
--------------------------------------------------------------

 From the user comments in the PHP manual for predefined variables
where $HTTP_RAW_POST_DATA is discussed.
It should be noted that $HTTP_RAW_POST_DATA only exists if the encoding
type of the data is -not- the default of
application/x-www.form-urlencoded, and so, to accessing raw post data
from an HTTP form requires setting enctype= in your HTML.

Try setting the enctype to text/xml and see if that helps any.

Also, it's in the $GLOBALS array, so try $GLOBALS['HTTP_RAW_POST_DATA']
instead.
__________________
He is my Defender, I will not be defeated!, Psalm 62:6 (New Century)
I may not produce beautiful code, but at least God has blessed me with
the ability to produce beautiful children!
Last edited by TheDefender : 07-09-2005 at 09:24 PM.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: access to $HTTP_RAW_POST_DATA

zheka-2
In reply to this post by cookxyz@gmail.com

this worked.

thank you very much


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---