mime problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Chmara

    mime problem?

    I have a php script that under some circumstances causes my browsers to
    prompt me to open or save the file.

    The file is an index file, index.php. When I try to open it from the root
    of the domain. domain.com (or www.domain.com), I get a dialog box asking if
    I wish to open the file or save it.

    If I open any other PHP script in the root of the domain, it parses and
    works properly.

    If I open the file from a sub domain, sub.domain.com, it works properly.

    If I open it locally (XP Pro SP2, Apache 2.0.48, PHP 4.3.4.), it works
    properly.

    If I open it on another machine, it works properly.

    Clearly, it has something to do with my machine, but given the limited
    circumstances under which the problem occurs, I'm struggling to figure out
    what the problem might be. Any help would be appreciated.

    Thanks,
    Bob Chmara


  • Tommy Gildseth

    #2
    Re: mime problem?

    Bob Chmara wrote:
    [color=blue]
    > I have a php script that under some circumstances causes my browsers to
    > prompt me to open or save the file.
    >
    > The file is an index file, index.php. When I try to open it from the root
    > of the domain. domain.com (or www.domain.com), I get a dialog box asking
    > if I wish to open the file or save it.
    >[/color]

    If you download it, do you get the HTML code, or do you get the actual
    unparsed PHP code?

    --
    Tommy

    Comment

    • nospam@geniegate.com

      #3
      Re: mime problem?

      Bob Chmara <spam@chmara.no spam.com> wrote:[color=blue]
      > I have a php script that under some circumstances causes my browsers to
      > prompt me to open or save the file.
      >
      > The file is an index file, index.php. When I try to open it from the root
      > of the domain. domain.com (or www.domain.com), I get a dialog box asking if
      > I wish to open the file or save it.
      >
      > If I open any other PHP script in the root of the domain, it parses and
      > works properly.[/color]

      Something to try:

      telnet domain.com 80
      GET /index.php HTTP/1.0^M
      ^M

      Inspect the headers and see what it's sending you. (Particularly the
      Content-Type)

      My guess is it's a vhost configuration issue.

      Jamie
      --
      http://www.geniegate.com Custom web programming
      guhzo_42@lnubb. pbz (rot13) User Management Solutions

      Comment

      Working...