php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26329 domxml_open_file xmlParseEntityRef error
Submitted: 2003-11-20 08:19 UTC Modified: 2003-11-20 08:35 UTC
From: mpk at olos dot nl Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.2 OS: Linux Mandrake 9.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mpk at olos dot nl
New email:
PHP Version: OS:

 

 [2003-11-20 08:19 UTC] mpk at olos dot nl
Description:
------------
domxml_open_file will crash with xmlParseEntityRef error when it reads a value with the "&" character in an XML file. 


Reproduce code:
---------------
Code:
if (!$dom = domxml_open_file($xmlFilePath, 0, $errors)) {

File:
<praktijk>
   <naam>Test Dev & Nieuwe Versie</naam>
   <adres>Demolaan 1</adres>
   <woonplaats>1010AA Demostad</woonplaats>
   <telefoonnummer>010000000</telefoonnummer>
   <serienummer>112003</serienummer>
</praktijk>



Expected result:
----------------
Load the tree...

Actual result:
--------------
Warning: domxml_open_file(): xmlParseEntityRef: no name in /var/www/html/sms/smssentester.php on line 44

Error capture: 
[errormessage] => xmlParseEntityRef: no name 
[nodename] => naam 
[line] => 4 
[col] => 10 
[directory] => /home/sms 
[file] => /home/sms/20031120122827000.xml

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-20 08:35 UTC] rrichards@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

& is not a valid xml character.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC