title: XMLReader can't open large (>2gb) XML files
body: <p>I've written an application that parses large XML files in PHP using XMLReader.</p>
  
  <p>Generally, the application works great, <strong><em>EXCEPT</em></strong> when I attempt to read a file that's larger than 2gb.</p>
  
  <p>(I haven't figured out exactly where the cut-off is; it works flawlessly on a 500mb file, but fails on the next largest file I have - 2.5gb).</p>
  
  <p>Specifically, if my code looks like this:</p>
  
  <pre><code>$reader = new XMLReader();
  if ($reader-&gt;open("big.xml")) {
      echo "Success!";
      $reader-&gt;close();
  } else {
      echo "Failed!";
  }
  </code></pre>
  
  <p>If I test the large (>2gb) file - I get this:</p>
  
  <pre><code>Warning: XMLReader::open() [xmlreader.open]: Unable to open source data in [php script]
  </code></pre>
  
  <p>And of course, <code>Failed!</code> is output.</p>
  
  <p>If I try with a smaller (500mb) file - I get only the <code>Succcess!</code> output.</p>
  
  <p>As far as I can tell - there's no difference between the large files that can't be opened and the medium-size files that can be opened (e.g. permissions, valid XML, encoding) <strong><em>EXCEPT</em></strong> the size of the file.</p>
  
  <p>While the size of the file is large - the nodes are all tiny, so I don't think any single node would cause a memory issue.</p>