Answer the question
In order to leave comments, you need to log in
Gives out of memory error XMLReader::XML?
Good afternoon, does it give an error about lack of memory? I declare two variables $xmlReader = new XMLReader() and I get an error Warning: XMLReader::XML(): Memory allocation failed : growing buffer
A piece of the program where I declare variables
$mas_xml= file_get_contents('Price.xml');
$xmlReader = new XMLReader();
$xmlReader->xml($mas_xml);
while ( $xmlReader->read() && $xmlReader->name !== 'categories');
$node = new SimpleXMLElement($xmlReader->readOuterXML());
$mas_xml2=file_get_contents('GoodsProperties.xml');
$xmlReader_descriptions = new XMLReader();
$xmlReader_descriptions->xml($mas_xml2);
while ( $xmlReader_descriptions->read() && $xmlReader_descriptions->name !== 'properties');
$node_descriptions = new SimpleXMLElement($xmlReader_descriptions->readOuterXML());
Answer the question
In order to leave comments, you need to log in
Increase the memory limit for the script, for example up to 2GB
<?php
ini_set("memory_limit", "2056M"); //выделяем 2Гб памяти на работу скрипта
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question