Menu

Content-Type: text/html

Help
2001-02-12
2001-02-13
  • Nobody/Anonymous

    Whenever I upload files, it shows Content-Type: text/html at the top of each one.  Has anyone ever seen this before?

    NOTE:  I'm using Linux on the client and server side when this happens.

     
    • Jason Wies

      Jason Wies - 2001-02-13

      This is almost certainly a problem with your Apache/PHP setup.  In some programming languages, you have to specify the Content-Type manually in the script.  However, PHP handles this automatically.  Thus there is no mention anywhere of Content-Type in PHPWebHosting.  Some suggestions for fixing the problem:

      1) Get the latest (non-alpha) Apache and PHP
      2) Try a different browser.  Different browsers handle file uploads differently

      There are a myriad of possible (and interesting!) causes, but I suspect just using the latest Apache and PHP will fix it.

       
    • Nobody/Anonymous

      Well, I'm running pretty current on both apps:

      apache-1.3.14
      php-4.0.4pl1
      phpwebhosting-0.2.1-1 (fyi)

      I just tried in on IE and same thing happens.  This is strange indeed.

       
      • Jason Wies

        Jason Wies - 2001-02-13

        I still thinks it's PHP issue, maybe has nothing to do with Apache.  Have you checked bugs.php.net and bugs.apache.org?  It's possible it's a known bug.  I just double checked the upload part of PHPWebHosting, and there is nothing in there that would cause this, and it certainly wouldn't put text/html on a file that isn't text/html.  If you need to see what PHP does, just run the command line version 'php' (compile PHP without the --with-apache to get it) and you'll see it spits out the "Content-type", along with an "X-Powered-By".

        I haven't tested phpwebhosting with 4.0.4pl1, so if that turns out to be the problem you should definitely report the bug to the PHP developers.  Also, you should try another PHP app that does file uploads (owl.sourceforge.net has one) and see it they all behave the same.

         

Log in to post a comment.