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:
Internet Explorer
File Download
======================================
Do you want to open or save this file?
Name: file.php
Type: Unknown File Type, 8.55 KB
From: www.mysite.com
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.
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.
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.
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…
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.