title: failed to open stream: File name too long
body: <p>I'm facing this error when trying to get the contents of a url:</p>
  
  <p><strong>failed to open stream: File name too long in</strong> ...</p>
  
  <p>Code:</p>
  
  <pre><code>    $url = "/var/www/vhosts/myvhost/scripts/needed_script.cgi?needed_param1=some_value&amp;needed_param2=some_value&amp;needed_param3=some_value"; // and continues up to a long of 926 chars
  
      $url = str_replace(' ','%20',$url);
  
      $web = file_get_contents($url);
  
      $web = implode('', $web );
  </code></pre>
  
  <p>Is there anything I can do to avoid this error? Some php.ini setting or anything..</p>
  
  <p>It happens with a new server with PHP 5.3, on the old one, with PHP 4.3 didn't happen.</p>