migration.user (FileMaker, Inc.) asked a question.
FileMaker Server PHP error -"XML error: No memory at line 1 (error )"
ProductFileMaker Server
Version13.0.5.520
Operating system versionOS X - 10.9.3 and Windows Server 2012 Standard
Description of the issueAfter performing a find command in PHP, if filemaker returns a large amount of data, the error message 'XML error: No memory at line 1 (error )" is returned and process halted. The actual line number varies.
Trial and error suggests returning around 200,000-300,000 or more fields cause this issue (1,000 records from a layout with 200-300 fields).
I have found this problem occurs with any database if enough data is returned, including those made from scratch with just one one table. The problem is not with my deployment, as the same result is returned when using cleaned installs of OS X 10.9 and Windows Server 2012.
The issue started occurring when I did the latest update (as far as I can work out). I cannot find any previous versions of FMS so I cannot test if this is the case.Steps to reproduce the problem
Create a new database with 300 fields, put all 300 in the layout 'data' and create 1000 records, upload it to Filemaker Server 13.0.5.520. Use the PHP below to return all records:
$findCommand =& $fm->newFindCommand('data');
$result = $findCommand->execute();
if (FileMaker::isError($result)) {
die('
'.$result->getMessage().' (error '.$result->code.')
');}
else {
$records = $result->getRecords();
}Expected result
Returns 1,000 records
Actual resultReturns "XML error: No memory at line 1 (error )"
Exact text of any error message(s) that appear"XML error: No memory at line 1 (error )"
The line number variesConfiguration information
Single machine setup. Tested under:
- PHP Version 5.4.24 in OS X 10.9.3, Apache, (12GB Ram)
-PHP Version 5.5.16 in Windows Server 2012 Standard Edition, IIS/8.0, (8GB Ram)
-PHP Version Version 5.4.27 in Cent OS (connecting to the above Windows server)Workaround
Optimise the layout, so it has fewer fields. Perform a search for fewer records.
James Collins:
Thank you for your post.
Our Development and Testing departments are aware of PHP introducing an unchangeable 10MB limi on XML data. Queries returning more than 10MB fail and return the error.
I have attached your post to the original report. When more information becomes available, I will post again. Until this changes, use the workaround by searching for less fields or fewer records.
TSGal