0

With PHP CLI, when can I get this error:

SimpleXMLElement::asXML(): Memory allocation failed : creating output

Does it because I don't have enough memory or should I suspect anything else?

Maxime
  • 1
  • 2
  • Increase php`memory_limit` or use `XMLWriter` it support flush buffer. – Pavel Musil Apr 10 '20 at 15:50
  • Increase the memory available for the PHP script and try again, you will have your answer. – lbrandao Apr 10 '20 at 15:50
  • That sounds like the memory allocation is running out inside the XML parser, rather than in PHP - it's the same error as reported in this question: https://stackoverflow.com/questions/60950500/simplexml-load-string-memory-allocation-failed Can you come up with some example code that reproduces the problem? – IMSoP Apr 14 '20 at 09:14

0 Answers0