Lists Home |
Date Index |
- To: email@example.com
- Subject: Re: [xml-dev] Problem parsing a RSS file with XML parser
- From: Pelle Nilsson <firstname.lastname@example.org>
- Date: Sun, 12 Sep 2004 00:20:05 +0200
- In-reply-to: <20040909121813.DF10715FDE2@macintosh.inf.ed.ac.uk>
- References: <20040908223551.GD800@gandalf> <20040909121813.DF10715FDE2@macintosh.inf.ed.ac.uk>
- User-agent: Mutt/1.5.6+20040818i
Thanks! I could now solve the problem by configuring PHP to send a
HTTP_USER_AGENT header. It's probably good practice to that always.
On Thu, Sep 09, 2004 at 01:18:13PM +0100, Richard Tobin wrote:
> I replied to this on xml-dev yesterday but my message doesn't seem to
> have got through. Here it is:
> In article <20040908223551.GD800@gandalf>,
> Pelle Nilsson <email@example.com> wrote:
> >I am trying to validate a RSS 0.9 document (not created by myself)
> >with PHP's DOM parser. The parser can't parse the file,
> >because it mistakes the doctype-tag for the root tag.
> No, that's not the problem.
> The problem is that the HTTP server is sending this back before the
> <br />
> <b>Warning</b>: get_browser(): HTTP_USER_AGENT variable is not set,
> cannot determine user agent name in <b>/usr/rss/php/config.inc</b> on
> line <b>38</b><br />
> <br />
> <b>Warning</b>: Cannot modify header information - headers already sent
> by (output started at /usr/rss/php/config.inc:38) in
> <b>/usr/rss/php/backend.php</b> on line <b>3</b><br />
> Presumably you aren't seeing this when you look at it in a browser
> because in that case the HTTP request contains a user-agent header.
> If you fetch the document with wget and validate it, it's fine.
> -- Richard