You have chosen to open index.php? - FF not viewing pages

User Help for Mozilla Firefox
Locked
mikesg
Guest

You have chosen to open index.php? - FF not viewing pages

Post by mikesg »

I have to copy a link and open it in IE from time to time because FF won't open it. It asks instead to save the page as if I clicked a link to download a zip file or something of that nature. Right now, this link (for example) doesn't open in FF or Seamonkey in XP or Vista.

http://www.neowin.net/forum/index.php?s ... getnewpost

It suddenly works on one of my machines, but still not on others. I'm sure eventually it would work on others as well but I've done nothing to try and fix it and would like to know if this is a known bug. My searching hasn't turned up anything.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Post by jscher2000 »

Well, seems they fixed it by now. Can you launch that link normally?

Hard to say at this point what was happening, but unless you have PHP defined in your download actions (Tools > Options..., Content tab, "Manage"), then probably it was a problem on the server. Sometimes servers are not configured to send script-generated pages (.asp, .php, .py) as HTML and instead they are sent as binary files. Internet Explorer checks the beginning of a file to see whether the server is telling the truth and if it finds that it really is an HTML file, it will display it in the browser. Firefox takes the server at its word and treats it as a download.
mikesg
Guest

Post by mikesg »

I don't think it's the site's fault. I get this only in FF. Sometimes it will work as expected, but I see this often enough on multiple machines that it's got be be a problem other people are having.
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Post by jscher2000 »

mikesg wrote:I don't think it's the site's fault. I get this only in FF.

Please see my earlier explanation of why IE doesn't do this.
User avatar
techbot
Posts: 27
Joined: July 18th, 2003, 12:00 pm

Post by techbot »

I have this exact same problem ... on myspace a lot and sometimes on my own gaming site. I did the unthinkable - I chose to open it and told FF what program to open it with..."itself of course" was my thinking.

Now when FF has a problem on any site with this, I get so many tabs popping up that I have to CTL ALT DEL to close out FF. Any suggestions? I've looked back through my windows settings under File types and extensions but all my php's are set to open with my web design software.
Techbot
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Post by makaiguy »

When you click on a link, your browser sends an http request. The system at the other end evaluates the request, then sends back an http response header attached to the return file. NOTE: this is in addition to any statements included in the <head> section of an actual html document.

Browsers handle the reception of the response header transparently so the general user is not aware of it.

One of the functions of the http response header is to define what type of file is attached, via a "content-type" (often referred to as MIME type) declaration - this tells the browser how to handle the file. It is this content-type in the response header (NOT the filename extension) that FFox uses to determine how to handle the file. It is the responsibility of the server housing the files to send an appropriate content-type in the http response header.

Sometimes the server housing the file in question may not be configured correctly and delivers an http response header with an incorrect content type. Files to be displayed as Html should have content type of "text/html"; plain text files should have content type of "text/plain"; executable files will have content type "application/octet-stream" or one more specific to the application.

If a file is served with a content type that isn't automatically displayed or handled by FFox, it will ask you what to do with the file. MSIE, on the other hand, ignores the http standards, ignores the http header content-type, and takes its own best guess on how to handle the file - consequently many server admins aren't even aware of the problem if they are serving the files with the wrong content type.

So if your file is being served with a content type other than "text/html" then TBird won't display it as a web page.

You can see what content type was received by FFox. Right-click on an empty part of the displayed page and choose "View Page Info" from the resulting menu. Under the General tab, look at the "type" line.

If you're not convinced (or don't trust what FFox tells you, or, as in your case, if the page isn't displayed by FFox at all so you can't view its page info), go to www.web-sniffer.net and enter the URL of your page or link. Then scroll down to the reply header that is displayed and see what is listed as "content type".

If an inappropriate content type is being sent, contact the webmaster, as they need to fix this at the server.
Doug Wilson
Win10 64bit: FF 124.0.2 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 124.2.0/115.9.0 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
User avatar
techbot
Posts: 27
Joined: July 18th, 2003, 12:00 pm

Post by techbot »

I understand how the php code works, but this is myspace...I've been there hundreds of times on FF with no issues.

My main problem was changing this file where FF wouldn't open it as a file everytime. I had accidentally clicked "Open with" and chose FF...putting FF into an indefinite loop when index.php couldn't be opened
Techbot
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Post by jscher2000 »

I think your choice may have been saved in http://kb.mozillazine.org/MimeTypes.rdf which is in your profile folder.

I've looked at that file and although it seems as though it should be editable, it's quite difficult to understand.

If you can't fix the errant setting using Tools > Options..., Content, "Manage..." then you could try the extension (I think it's named MIME Edit) that eases editing of MimeTypes.rdf. Or you could rename/delete it and let Firefox build you a new one.

Any luck?
User avatar
techbot
Posts: 27
Joined: July 18th, 2003, 12:00 pm

Post by techbot »

That did it....went to manage the files and reset the way FF handles that file. The Myspace server doesn't always do it, which is why I thought it was a prob with FF. FF will try to download the index.php, but if i close that box and refresh, FF will open it right up.
Techbot
dlabrie
Guest

Re: You have chosen to open index.php? - FF not viewing pages

Post by dlabrie »

techbot wrote:That did it....went to manage the files and reset the way FF handles that file. The Myspace server doesn't always do it, which is why I thought it was a prob with FF. FF will try to download the index.php, but if i close that box and refresh, FF will open it right up.
I've developed a website:
http://www.marketinglaunchinnovations.com
When I click on any links in Firefox, I seem to get the same issue above: "you have chosen to open". I've gone through all the code, but I can't seem to identify the issue? Can anyone help?
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Re: You have chosen to open index.php? - FF not viewing pages

Post by Daifne »

dlabrie,
Problems with sites that you develop belong in the Web Development forum, not Firefox Support. You will need to register to post there, though. Do so and you should receive the help you need there.

I'm now locking this two year dead topic.
Locked