From:             laura at websalad dot com dot au
Operating system: 
PHP version:      5.2CVS-2007-12-10 (snap)
PHP Bug Type:     DOM XML related
Bug description:  Out of memory fatal error using the dom schemaValidate 
function

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 bug report at http://bugs.php.net/?id=43550&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43550&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43550&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43550&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43550&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43550&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43550&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43550&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43550&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43550&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43550&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43550&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43550&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43550&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43550&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43550&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43550&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43550&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43550&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43550&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43550&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43550&r=mysqlcfg

Reply via email to