#43550 [Com]: Out of memory fatal error using the dom schemaValidate function

From: Date: Fri, 14 Dec 2007 18:52:00 +0000
Subject: #43550 [Com]: Out of memory fatal error using the dom schemaValidate function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120654@lists.php.net to get a copy of this message
ID: 43550 Comment by: crescentfreshpot at yahoo dot com Reported By: laura at websalad dot com dot au Status: Open Bug Type: DOM XML related PHP Version: 5.2CVS-2007-12-10 (snap) New Comment: That is not reproducible code. Previous Comments: ------------------------------------------------------------------------ [2007-12-10 01:50:45] laura at websalad dot com dot au Description: ------------ Using the dom function schemaValidate function occurs a the following error: Fatal error: Out of memory (allocated 8650752) (tried to allocate 63 bytes) in /home/arrowvoi/arrowvoice/html/xmlforms/tools.php on line 48 The line of the error is (if (!$dom->schemaValidate($schema)) ). I already put the memory limit to 256MB using a local php.ini, the hosting has it at 32MB, but it didn't work. I also tried with memory_limit -1. I'm using php 5.2.3. I have also the same function in my Windows Vista PC and it works propertly, but in the server it doesn't. I would really appreciate any help cause I've been working with this for a long time and I haven't found a solution. Reproduce code: --------------- function validateXML($formName, $xmlUrl, $xmlBody, $schema){ libxml_use_internal_errors(true); $dom = new DomDocument(); $dom->load($xmlUrl); if (!$dom->schemaValidate($schema)) { $valid = false; $errorMessage = $this->libxml_display_errors(); $validationMail = $this->createValidationMail($formName, $xmlBody, $errorMessage); } else { $valid = true; $validationMail = ''; } return $validationMail; } Expected result: ---------------- The function should finished successfully returning a validation String with the results. Actual result: -------------- Fatal error: Out of memory (allocated 8650752) (tried to allocate 63 bytes) in /home/arrowvoi/arrowvoice/html/xmlforms/tools.php on line 48 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43550&edit=1

« previous php.bugs (#120654) next »