php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45538 DomDocument throwing two errors?
Submitted: 2008-07-17 06:49 UTC Modified: 2008-07-26 11:28 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ross dot sean at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ross dot sean at gmail dot com
New email:
PHP Version: OS:

 

 [2008-07-17 06:49 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-24 03:51 UTC] graha at phoenixfly dot com
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.
 [2008-07-26 11:28 UTC] bjori@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Read the errormessage please.
this is not a documentation problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 25 01:01:31 2024 UTC