world and so its great that there are people out there who are prepared to
share their knowledge.
Anyway, I am developing a website on my home pc. I dont have server-space
outside my home. So, I needed to be able to validate my code by file
upload to the W3C's html validator at http://validator.w3.org/
This solution is so easy, I am surprised that my extensive googling didnt
provide an answer as it does return MANY hits relating to this search. I
thought I would post this so that there is something **out there** for
others that come across this problem.
My original problem was ...
I have installed Apache2 and PHP on my Mdk 9.2 box. I have made an
info.php page to test if php is working. It appears that it is as my
info.php is displayed as it should be on my web-browser.
The only thing is, when I upload the info.php file to the W3C validator,
it complains:
**Sorry, I am unable to validate this document because its content type
is application/octet-stream, which is not currently supported by this
service.**
The solution is very easy. Thank you to Michael Fuhr for the tip!
Some browsers on some systems use the file ~/.mime.types,
/etc/mime.types, or another such file to determine an uploaded file's
Content-Type. Creating or editing one of those files and adding a line
such as "text/html php" should do the trick, although I don't know what
other implications that might have.
On Mandrake Linux 9.2, in the file /etc/mime.types change this line:
text/html html htm
to
text/html html htm php
The W3C validator will then start accepting the output of php files.
Yippee!! No more ** content type is application/octet-stream ** problem!
Thanks once again for helping me out!!!
--
== cBe! ==== @ntho === 8 ^ ) ========================================
== Famous last words from Registered Linux User #296186 =============
== "I would have made a good Pope." - Richard M. Nixon (1913-1994) ==