therschbach Posted April 2, 2009 Share Posted April 2, 2009 My webhost control panel says....malformed header from script. Bad header=<!DOCTYPE html PUBLIC "-//W3C/: /home/dirt/public_html/index.phpSomeone here told me to paste this into the top of the page...<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">I don't know anything about how these headers work... does anything seem obviously incorrect? Link to comment Share on other sites More sharing options...
pedropinto Posted April 2, 2009 Share Posted April 2, 2009 Hi!That line is the HTML doctype declaration.You can get some more usefull informations here:http://www.w3schools.com/tags/tag_DOCTYPE.asp Link to comment Share on other sites More sharing options...
jeffman Posted April 2, 2009 Share Posted April 2, 2009 No, there is nothing obviously wrong. I suppose some invisible characters could have crept into it while copying and pasting. Maybe at the line break.More likely it's the context. The error says this is a script. Is there some PHP or something that comes before the doctype? If so, can you post the whole document from the first line down to a couple lines past the doctype?Why is this showing up in your webhost control panel? Link to comment Share on other sites More sharing options...
therschbach Posted April 2, 2009 Author Share Posted April 2, 2009 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head> Are there supposed to be no spaces in the header?There is an error console in my control panel and I had never looked at it before. It also informed me of a problem in my PHP code that I also fixed, although it didn't break the code or the page. Link to comment Share on other sites More sharing options...
jeffman Posted April 2, 2009 Share Posted April 2, 2009 The indentation before "http . . ." is according to W3C recommendations. I don't know why it's there, but everyone does it. I normally have my <html> tag on the very next line, but I don't think that's required.If it were me, and the pages behave correctly in browsers, I'd ignore this, get on with my life. Link to comment Share on other sites More sharing options...
therschbach Posted April 2, 2009 Author Share Posted April 2, 2009 Sounds good to me! Link to comment Share on other sites More sharing options...
pizzaguy Posted April 3, 2009 Share Posted April 3, 2009 just going to throw my 2 cents in here and say that there is probably a problem somewhere else. Unless I'm missing something, i see no reason for the DOCTYPE declaration to cause a header problem. Is the code you posted right out of the file or is it the copied source from the browser? Link to comment Share on other sites More sharing options...
jlhaslip Posted April 3, 2009 Share Posted April 3, 2009 <!DOCTYPE html PUBLIC "-//W3C/: /home/dirt/public_html/index.php Unless the file " /home/dirt/public_html/index.php" contains a copy of the W3C DTD, this line of code will not be a valid Doctype. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.