ID: 43550 Updated by: [EMAIL PROTECTED] Reported By: laura at websalad dot com dot au -Status: Open +Status: Feedback Bug Type: DOM XML related PHP Version: 5.2CVS-2007-12-10 (snap) New Comment:
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: ------------------------------------------------------------------------ [2007-12-14 18:51:59] crescentfreshpot at yahoo dot com That is not reproducible code. ------------------------------------------------------------------------ [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