AnsweredAssumed Answered

Unchangeable 10MB Limit on PHP xml_parse means we can't get all our data from FM Publishing with one...

Question asked by squivo_1 on Sep 5, 2014
Latest reply on Jun 13, 2017 by TSGal

Summary

Unchangeable 10MB Limit on PHP xml_parse means we can't get all our data from FM Publishing with one query

Product

FileMaker Server

Version

13.*

Operating system version

Mavericks 10.9.4

Description of the issue

PHP introduced an unchangeable 10MB Limit on XML data via the XML PARSER library.  Queries returning more than 10MB die and return an error.

Steps to reproduce the problem

Ensure you are running php >= 5.4 & FM13.  Use Custom publishing.  Create a web layout on a table with lots of data. Write a query to return that data.  Make sure you're returning more than 10MB of data.

Expected result

Return my data, like any other query

Actual result

Dies with error

Exact text of any error message(s) that appear

xml_parse No memory at Line 1

Configuration information

There is another xml parser ( simple xml ) which is actually better than the 'xml parser' library, but FM publishing doesn't use that one.  The maximum size of the simplexml parser can be adjusted - but - why would you want to return 10MB of data anyways??? Looking carefully at the data that FM Publishing returns, it seems only a tiny percent of the returned data is actually useful... the rest is just... well, not useful.  Isn't it time to update the parser to return only the valuable information required in JSON format, or at least a reduced XML object?  For custom Web Publishing, why would we need ANY data besides the field information and relatedSets?

Workaround

Split data into different layouts and query each layout individually.

Outcomes