I'm creating a feed file for Google base in XML. This file can get quite large,
depending on the number of products I have. It is anywhere from 20MB to 35MB+.
Opening the file like this:
$fp = fopen($filename, 'xb');
Now, I'm using code like this to add text to the file after each product node is built $items contains the XML source for each product in the table In this case, I'm limiting the number of products to 13,000, but I have over 24,000 in my table:
$this->_addToFeed($fp, $items);
I'm also clearing out $items at each iteration through the products table.
private function _addToFeed($fp, $str) {
fwrite($fp, $str, strlen($str));
} // private function _addToFeed($str)
Now I keep getting, a "The connection was reset" error and then it goes to a dialog that says "Apache HTTP server has encountered a problem and needs to close."
I do close the file after the last node is written but it never gets to that spot in my code.
I'm running WAMPServer 2.0 with PHP v5.3.1, mySQL v5.1.36 and Apache Server v2.2.11. What could be causing this in my Apache setup?