wbtenor — 2006-10-11T10:05:36-04:00 — #1
I left my website alone for a while, and have come back every so often in my browser of choice (Firefox) to make sure everything looks OK. I just got a call from a friend who said my entire site is down. He's using IE. So I fired up IE and sure enough, IE is prompting a download for every PHP page I've tried accessing. Here is the message of the prompt:
Do you want to open or save this file?
Type: Unknown File Type, 8.55 KB
OPEN | SAVE | CANCEL
[x] Always ask before opening this type of file
While files from the Internet can be useful, some files can
potentially harm your computer. If you do not trust the source,
do not open or save this file. [U]What's the risk?[/U]
I don't even know where to begin troubleshooting this. If you have any advice, please let me know! Thank you in advance.
system — 2006-10-11T10:11:49-04:00 — #2
hmm, that usually happens when the server isn't running PHP.
markl999 — 2006-10-11T10:14:42-04:00 — #3
This is usually down to a missing/bad AddType handler for php files.
Check Apache's httpd.conf file for a lines like:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Also make sure there's a line like:
LoadModule php5_module /usr/lib/apache/1.3/libphp5.so
wbtenor — 2006-10-11T10:25:23-04:00 — #4
Crap. Safari is showing the same behavior. It is trying to download all PHP files just like IE Win. Things work normally in Firefox, Opera, iCab, Mac IE 5 so far.
mmanders — 2006-10-11T10:43:51-04:00 — #5
If you host this site from your own PC or a dedicated server, I would check that Apache (httpd.conf) is setup to pass execution of PHP files to PHP. If this site is on shared hosting or hosted by a company rather than yourself it sounds like they are experiencing problems with their server. I'd get in touch and find out what is happening to cause this loss of service.
wbtenor — 2006-10-11T11:34:19-04:00 — #6
Thanks for the help. It is not my own server, and I don't have access to the httpd.conf. I have contacted the company and they are "looking into it." It seems really strange that this would only effect certain browsers...
clamcrusher — 2006-10-11T14:40:58-04:00 — #7
post the http response headers of a problematic page.
you can use this tool(use the tool in IE)
or you can use the http live headers extension for firefox to view the headers.
what is the contents of the file that it downloads? is it the html output, or the php source code?
wbtenor — 2006-10-11T19:35:23-04:00 — #8
Thank you for all of the help. The issue was indeed with the server and is now resolved. I didn't have a chance to view the headers before it was fxed. I would've liked to check that in order to hopefully help any forum readersa in the future that may have this problem. The problem was in the php.ini file (on the server's config, not one of my own)
There was a value of:
default_mimetype = texthtml
that needed changing to:
default_mimetype = "text/html"
I hope this helps someone down the road. Thanks again all.
cranial_bore — 2006-10-11T23:13:29-04:00 — #9
Sometimes object buffering and/or gz_compression can cause this.
Do you use compression on your pages?
wbtenor — 2006-10-12T02:12:19-04:00 — #10
none that I'm aware of unless the server automatically is doing it.