<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2418</bug_id>
          
          <creation_ts>2005-10-25 18:58:03 +0000</creation_ts>
          <short_desc>PHP file validation</short_desc>
          <delta_ts>2005-10-25 23:16:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>check</component>
          <version>HEAD</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bryan">bsaliba</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6900</commentid>
    <comment_count>0</comment_count>
    <who name="Bryan">bsaliba</who>
    <bug_when>2005-10-25 18:58:03 +0000</bug_when>
    <thetext>I am receiving the follwoing error when I try to validate a .php file;

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 Content-Type field is sent by your web server (or web browser if you use 
the file upload interface) and depends on its configuration. Commonly, web 
servers will have a mapping of filename extensions (such as &quot;.html&quot;) to MIME 
Content-Type values (such as text/html). 

That you received this message can mean that your server is not configured 
correctly, that your file does not have the correct filename extension, or 
that you are attempting to validate a file type that we do not support yet.

However, If I JUST rename the file to .html it passes validation.

What could be the problem?
Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6902</commentid>
    <comment_count>1</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2005-10-25 20:10:23 +0000</bug_when>
    <thetext>Your web server or your PHP code is broken. It&apos;s claiming the output of
your PHP is arbitrary binary data (&quot;application/octet-stream&quot;) instead
of HTML (&quot;text/html&quot;) as it should.

Take a look at http://php.net/header or ask on some PHP related forum
for help with fixing this.

In either case, this is not a Validator bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6908</commentid>
    <comment_count>2</comment_count>
    <who name="Bryan">bsaliba</who>
    <bug_when>2005-10-25 23:06:59 +0000</bug_when>
    <thetext>Hi,

This is the header of my php file;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; lang=&quot;en&quot; xml:lang=&quot;en&quot;&gt;
   
   
&lt;!-- Administrator registration and validation adminform.php --&gt;

   &lt;head&gt;
      
      &lt;title&gt;Administrator Registration Form Validation&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;/&gt;

Content is set to text/html as you can see.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6909</commentid>
    <comment_count>3</comment_count>
    <who name="Bj">bjoern</who>
    <bug_when>2005-10-25 23:11:16 +0000</bug_when>
    <thetext>The &lt;meta http-equiv=&quot;Content-Type&quot; ... is not relevant here. Also, it sounds 
like you are using the file upload validation rather than by web address, in 
this case your browser determines the Content-Type it reports to the web server 
when uploading the file. It probably does not recognize .php files and uses 
some default content type. In this case it might be difficult for you to use 
the file upload feature with your PHP code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6910</commentid>
    <comment_count>4</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2005-10-25 23:16:20 +0000</bug_when>
    <thetext>If you are using the file upload interface, try to rename your files with extensions .html, this will probably 
help your browser send proper content-type information with the upload.

If you are using the &quot;by URL&quot; interface, follow the instructions in Comment #1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>