Project

General

Profile

Actions

Feature #95021

closed

Handle "XML could not be parsed: Line ...: No memory" during import in EXT:impexp

Added by Alexander Nitsche about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Import/Export (T3D)
Target version:
-
Start date:
2021-08-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.4
Tags:
Complexity:
Sprint Focus:

Description

TYPO3 may hit memory limits when converting XML to PHP arrays, even before all PHP memory is consumed. This is probably due to a specific limit of 10 MB in libxml, which was introduced with libxml v2.7.0. This limit could be impractical when importing large XML files via EXT:impexp.

One solution could be to turn off the libxml limit, but this is only supported for the DOMDocument and simplexml_* implementations of libxml, but not for the current XmlParser implementation (a.k.a. xml_parser_*() functions):
https://stackoverflow.com/questions/5428055/xml-parse-huge-on-function-simplexml-load-string

Another approach could be to read and parse the XML file in blocks, as suggested in this stackoverflow thread:
https://stackoverflow.com/questions/19152613/xml-parse-no-memory-error-php


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #83580: GeneralUtility::xml2array() can't parse bigger files (> 10MB)Closed2018-01-16

Actions
Actions

Also available in: Atom PDF