title: Trying to save file from Flash to PHP using $GLOBALS["HTTP_RAW_POST_DATA"]
body: <p>Let me start by saying PHP isn't my forte, I'm usually reluctant to try working with it because of problems exactly like this. The code works fine on my local machine under MAMP and on my server, but doesn't on the clients server :'(</p>
  
  <p>So what am I trying to do, well - save an image from Flash onto the server, simple right?!</p>
  
  <p>I'm using the method described on this site here: <a href="http://designreviver.com/tutorials/actionscript-3-jpeg-encoder-revealed-saving-images-from-flash/" rel="nofollow noreferrer">http://designreviver.com/tutorials/actionscript-3-jpeg-encoder-revealed-saving-images-from-flash/</a> but have made a small alteration so that instead of echoing the jpg causing the browser to download it locally, I do an fwrite and an fclose to save it to the server.</p>
  
  <p>Here is my PHP:</p>
  
  
  
  <p>I've dona a phpinfo() on my clients server and it's running 5.2.2 my host is running 5.2.11 I don't know if much can have changed in those 9 minor revisions?</p>
  
  <p>I've also read another question on here which suggests making suer always_populate_raw_post_data is set to ON, but it's set to OFF on all of the server environments I've been testing in. I'm doing some XML saving using file_get_contents('php://input') which I've tried but failed to get working with images.</p>
  
  <p>Any help would be gratefully received, I'm happy to post the AS3 as well but it's EXACTLY the same as example I've linked above and works locally. As far as I can tell the problem lies with the PHP.</p>
  
  <p>Cheers.</p>