Dealing with huge XML file (more than 2 Mo) #8

Closed
opened 2026-01-24 11:37:55 +01:00 by admin · 1 comment
Owner

Originally created by @fma-emakinafr on GitHub (Jan 10, 2013).

I have a problem with files bigger than 2 Mo, nothing is decoded.

I found where is the problem but i can't solve it.

In the file :
https://github.com/FriendsOfSymfony/FOSRest/blob/master/Decoder/XmlDecoder.php (line 28)
line 28 : $xml = @simplexml_load_string($data);

If the file is greater than 2 Mo, the simplexml_load_string will return false.

Is there a way to bypass this ?

Originally created by @fma-emakinafr on GitHub (Jan 10, 2013). I have a problem with files bigger than 2 Mo, nothing is decoded. I found where is the problem but i can't solve it. In the file : https://github.com/FriendsOfSymfony/FOSRest/blob/master/Decoder/XmlDecoder.php (line 28) line 28 : $xml = @simplexml_load_string($data); If the file is greater than 2 Mo, the simplexml_load_string will return false. Is there a way to bypass this ?
admin closed this issue 2026-01-24 11:37:55 +01:00
Author
Owner

@fma-emakinafr commented on GitHub (Jan 10, 2013):

My bad, this was not a problem with the filesize but with an element who was at the exact 2 Mo limit of my file :/

@fma-emakinafr commented on GitHub (Jan 10, 2013): My bad, this was not a problem with the filesize but with an element who was at the exact 2 Mo limit of my file :/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FriendsOfSymfony/FOSRest#8