"NEW: This Version works better with PHP 5 -- contributed by Eloy Lafuente
xmlize() is a function written in PHP to traverse an xml file and put it's contents into a PHP array. It works best with small xml files, as big ones (larger than 1 megabyte) will result in a large array, too. There is a function called traverse_xmlize() that helps describe the structure of the array that xmlize() outputs" (from http://www.hansanderson.com/php/xml/)
"Check your memory limit. It may also be that the "memory_limit" in your php.ini is set too low. Please check your php.ini file and allocate the recommended amount (see Moodle requirements). For Moodle version 1.8 and above at least 40MB is recommended." (from Moodle docs)
Whilst this will circumvent the problem if the file is sufficiently small to process the whole thing 'in-memory', it doesn't provide a backup-file-size independent solution. It would be nice to see one.
Unfortunately, a similar problem has been closed on Moodle Tracker thus:
Resolution: | Won't Fix |
Priority: | Minor |
which is disappointing as the problem causes trouble and consumes time for Moodlers and will continue to do so. The underlying issue, of trying to process a file in memory regardless of the file size, does not seem to have been addressed.