title: file_get_contents permission denied for external wsdl
body: <p>I have three boxes in my network</p>
  
  <p>Box#1 - a RHEL box with apache and php (basically a LAMP box)  <br/>
  Box#2 - a windows box with JBoss hosting a WSDL using apache axis 2   <br/>
  Box#3 - another windows box (basically a XAMPP box -- more on the third box later)  <br/></p>
  
  <p>When I try to run a PHP script on box#1 that uses a SoapClient object to access box#2's  WSDL in a browser it returns:</p>
  
  <blockquote>
    <blockquote>
      <p>Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://XXX.XXX.XXX.XXX:8080/axis2/services/TheService?wsdl' : failed to load external entity </p>
    </blockquote>
  </blockquote>
  
  <p>I then tried on box#2 just to simply file_get_contents of the wsdl file I get back:</p>
  
  <blockquote>
    <blockquote>
      <p>Warning: file_get_contents(http://XXX.XXX.XXX.XXX:8080/axis2/services/TheService?wsdl): failed to open stream: Permission denied in /application/test.php on line 4</p>
    </blockquote>
  </blockquote>
  
  <p>HOWEVER! when I run the last script (file_get_contents) via telnet (command line) when logged in as the same user running apache it returns the WSDL's contents... (!)</p>
  
  <p>--</p>
  
  <p>I tried running the same code on a windows box (box #3) with what appears to be very similar PHP.ini settings to box#2 if not as identical as they could be and I was able to use the wsdl and get the contents of the WSDL file without a problem.</p>
  
  <p>--</p>
  
  <p>I searched (stackoverflow and google) and saw other people had the same issues and tried solutions where listed including:</p>
  
  <ul>
  <li>My PHP.ini's max_file_size is set to 128M (larger than the wsdl)</li>
  <li>allow_url_fopen is set to on</li>
  </ul>
  
  <p>Just to see if it worked on box#1 I tried using cURL to get the contents of the file and it did not return anything.</p>
  
  <p>If anyone can give me any insight it would be greatly appreciated. I'm sure there's a setting in PHP.ini that I am missing or something pretty minor. </p>