Firefox – Some websites prompt to download PHP script after some time, but only in Firefox

downloadfirefoxPHPscriptwebsite

This happens only in Firefox – NOT in IE or in Safari (all 3 tested only on a Windows system).

Always, viewing a page shows most of the content, and then the browser prompts to download some sidebar php script. Or, when going from one page to the next. It only happens on php using sites.

Best Answer

There are a few possibilities, but try downloading one of these files. Open it up in Notepad and search for <?php.

If you find any tags like that, then the server is not parsing PHP pages as it needs to, and probably passing the MIME type on to your browser. Since browsers cannot parse PHP client-side and it doesn't have a handler set up for that type, it considers it a generic download. If this is the case, there's nothing you can do. PHP is a server-side technology.

If no tags are present and it appears to be plain HTML, then it may be that the server is parsing the files but your browser is malfunctioning and not interpreting the types properly. It doesn't see it as a HTML page and so doesn't display it. There are two potential reasons for this: either the server is sending an incorrect MIME type or your browser is messed up.

Since you say it only occurs in one browser out of three, I'd recommend uninstalling that browser and installing the latest updated version as a test. If that doesn't help, you might have to look into a HTTP debugger to see what's being sent and figure out if it's a server-side issue or on your end.

Related Question