#45538 [Com]: DomDocument throwing two errors?

From: Date: Thu, 24 Jul 2008 03:51:34 +0000
Subject: #45538 [Com]: DomDocument throwing two errors?
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-997@lists.php.net to get a copy of this message
ID: 45538 Comment by: graha at phoenixfly dot com Reported By: ross dot sean at gmail dot com Status: Open Bug Type: Documentation problem Operating System: Windows PHP Version: Irrelevant New Comment: If you use PHP 5 in windows, you don't need to declare php_domxml.dll in your php.ini file. so u can give comment in the line php_domxml.dll in your php.ini file. you only need to comment it out, but do not delete the php_domxml.dll file in the ext directory. Previous Comments: ------------------------------------------------------------------------ [2008-07-17 06:49:24] ross dot sean at gmail dot com Description: ------------ I am trying to read an XML document. I have found several online examples for achieving this, as well as in the PHP Manual. Everyone does the first steps the same, and yet, when I attempt this it fails. As far as I can tell, I have the DOM class since it is provided with the base PHP, and also because I did specifically select the DOM portion of the PHP install (to ensure I have what I need). I get one Warning and one Fatal. Reproduce code: --------------- <html> <head> <title>PHP XML Reader</title> </head> <body> <!-- Read XML Here --> <?php $xmlDoc = new DOMDocument(); // PHP Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\\wwwroot\\TestSetup\\PHP_XMLReader.php on line 8 $xmlDoc->load('test.xml'); // PHP Fatal error: Call to undefined method domdocument::load() in C:\\wwwroot\\TestSetup\\PHP_XMLReader.php on line 10 echo '<p>"'. 't' .'"</p>'; ?> </body> </html> Expected result: ---------------- I expected my webpage to display "t"... but it is crashing when i attempt to load the xml file. Actual result: -------------- Nothing happend. error log reported: PHP Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\\wwwroot\\TestSetup\\PHP_XMLReader.php on line 8 PHP Fatal error: Call to undefined method domdocument::load() in C:\\wwwroot\\TestSetup\\PHP_XMLReader.php on line 10 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45538&edit=1

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