#45407 [NEW]: domxml function not documented

From: Date: Tue, 01 Jul 2008 17:51:38 +0000
Subject: #45407 [NEW]: domxml function not documented
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-918@lists.php.net to get a copy of this message
From: cweismann at ea dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: domxml function not documented Description: ------------ I ran into problems with the memory leak with domxml. I am working on a very old and very large website and am unable to upgrade to PHP5 until I have converted all of the old code, so I am writing my code to be compatible with both PHP4.3.2 and PHP5. After much searching, I located a bug report at http://bugs.php.net/bug.php?id=30911&edit=1 that mentioned $doc->free(), but I could not find any documentation for this function. I later found a very good description in the below post on http://us2.php.net/domxml-open-mem. This fixed the problem, but it would make life easier for other people with the same problem if the $doc->free(); function was documented. ej at campbell *dot* name 30-Nov-2003 07:54 <!-- quote --> The DOM XML parser does not automatically free memory when a DomDocument goes out of scope. If you're using the DOM parser to parse several XML files as part of a long running script, you must free the DomDocument manually or a memory leak will occur. To free a DOM document allocated by domxml_open_mem, do the following: $doc = domxml_open_mem("$contents"); $doc->free(); <!-- end quote --> -- Edit bug report at http://bugs.php.net/?id=45407&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45407&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45407&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45407&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45407&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45407&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45407&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45407&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45407&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45407&r=support Expected behavior: http://bugs.php.net/fix.php?id=45407&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45407&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45407&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45407&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45407&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45407&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45407&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45407&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45407&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45407&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45407&r=mysqlcfg

« previous php.doc.bugs (#918) next »