|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-14 18:51 UTC] crescentfreshpot at yahoo dot com
[2008-01-23 11:26 UTC] rrichards@php.net
[2008-01-31 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
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