View Full Version : What does this error mean?

08-22-2008, 06:10 PM
XML Parsing Error: not well-formed
Location: https://istop2shop.com/index.php?page=editprofile&do=edit&id=3
Line Number 1, Column 12:application/unknown0<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

08-22-2008, 08:12 PM
Can you show us the source of the site as well? (My browser won't show it because it's using a broken certificate.)

As it looks right now, from the little information you've given us:
- The content type should not be application/unknown, it should be the appropriate one for whatever you indend to us the document for, i.e. probably one of application/xml, application/xhtml+xml or text/html.
- It looks as if the literal text "application/unknown0" is part of the content, which it should not be. (column 12 would be the "/" in application/unknown)
- It could be that the XML parser expected a root element (<html></html>) before the end of the file but didn't find it. I don't see why that would indicate an error on col 12 though.

08-23-2008, 12:42 AM
I get this error when I try to upload a video on the website. So I guess the docu type needs to be video?

08-23-2008, 02:22 AM
I think it's this part.

$charset = "utf-8";
$mime = "text/html";

if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
// if there's a Q value for "application/xhtml+xml" then also
// retrieve the Q value for "text/html"
$_SERVER["HTTP_ACCEPT"], $matches)) {
$xhtml_q = $matches[1];
$_SERVER["HTTP_ACCEPT"], $matches)) {
$html_q = $matches[1];
// if the Q value for XHTML is greater than or equal to that
// for HTML then use the "application/xhtml+xml" mimetype
if($xhtml_q >= $html_q) {
$mime = "application/xhtml+xml";
// if there was no Q value, then just use the
// "application/xhtml+xml" mimetype
} else {
$mime = "application/xhtml+xml";
// output the mime type and prolog type
header("Content-Type: $mime;charset=$charset");
header("Vary: Accept");