By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

mime problem?

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Bob Chmara wrote:
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 you download it, do you get the HTML code, or do you get the actual
unparsed PHP code?

--
Tommy

Jul 17 '05 #2

P: n/a
Bob Chmara <sp**@chmara.nospam.com> wrote:
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.


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
gu******@lnubb.pbz (rot13) User Management Solutions
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.