|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1354 XML parser does not undersat attributes
Submitted: 1999-04-27 13:55 UTC Modified: 1999-09-15 17:13 UTC
From: jesusmc at scripps dot edu Assigned: ssb (profile)
Status: Closed Package: Other
PHP Version: 3.0.7 OS: Solaris 2.5.1
Private report: No CVE-ID: None
 [1999-04-27 13:55 UTC] jesusmc at scripps dot edu
The examples in the XML page do not work. The calls to startElement will give errors if there are attributes in the element tag. Also it does not understand the <?xml version="1.0" ?> declaration. I am using expat 1.0.2 (latest one), and the xmlwf program passes all the xml file in the examples, but once it is compiled in PHP, the XML parser breaks.
If I pass and XML file w/ tags devoid of attributes, it works. The XML files in the examples also display OK in the (Windows only) "XML Notepad" from MS.
I use the following commands during configuration:

% setenv CPPFLAGS -I/asd/metallo1/database/expat
% setenv LDFLAGS -L/asd/metallo1/database/expat
% ./configure --prefix=/home/jesusmc/devel/php3 --with-gd=/asd/metallo1/database/gd1.3 --with-xml --with-msql=/home/jesusmc/devel/msql --with-config-file-path=/homes/jesusmc/devel/php3 --enable-track-vars --enable-magic-quotes --with-apache=/home/jesusmc/sources/new-server/apache_1.3.6

Have not dig into the source to see what the problem could be. AFAIK this problem is not that the parser sends garbage in the attributes, it just stops and displays: (this is from running the second xml parsing example in the manual page, file xmltest.xml minus the xml, DOCTYPE declarations, and w/o entities)

   XML error: not well-formed at line 2

which corresponds to the attribute in the element <tgroup>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-16 14:30 UTC] ssb at cvs dot php dot net
I am unable to reproduce this error.  I tried parsing
your XML code with the "syntax highlighting" example
script, and it works fine.  This is linux expat 1.0.2,
glibc 2.0.7 and the latest CVS version of PHP.

Please supply more information, or give me access to your
machine so I can investigate the problem.

 [1999-09-15 17:12 UTC] eschmid at cvs dot php dot net
Closed, problem known (magic-quotes)
 [1999-09-15 17:13 UTC] rasmus at cvs dot php dot net
close it
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 18:03:40 2023 UTC