Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Problem parsing a RSS file with XML parser

From: Pelle Nilsson <pellenilsson@--------.-->
To: xml-dev@-----.---.---
Date: 9/11/2004 10:06:00 PM
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.

/Pelle


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 <pellenilsson@f...> 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
> document:
> 
>  <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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent