#45538 [NEW]: DomDocument throwing two errors?
| From: | ross dot sean at gmail dot com | Date: | Thu, 17 Jul 2008 06:49:24 +0000 |
| Subject: | #45538 [NEW]: DomDocument throwing two errors? | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-959@lists.php.net to get a copy of this message | ||
From: ross dot sean at gmail dot com
Operating system: Windows
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: DomDocument throwing two errors?
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 bug report at http://bugs.php.net/?id=45538&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45538&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45538&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45538&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45538&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45538&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45538&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45538&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45538&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45538&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45538&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45538&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45538&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45538&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45538&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45538&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45538&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45538&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45538&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45538&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45538&r=mysqlcfg