Closed Bug 577988 Opened 14 years ago Closed 13 years ago

clicking on a link occasionally causes a pop-up, asking what to do with a PHP file

Categories

(Core Graveyard :: File Handling, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 423506

People

(Reporter: errol.kowald, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.6) Gecko/20100625 Firefox
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.6) Gecko/20100625 Firefox

This fault occurs spasmodically, apparently only when logged in.

Clicking on a link will cause a window to pop up, entitled "Opening showthread.php", with the words
"You have chosen to open
 showthread.php
 which is a: PHP file
from: http://www.benelliforum.com
What should Firefox do with this file?
 Open with [Browse]
 Save File"

Curiously, SeaMonkey (1.1.17) displays a similar fault, with a slightly different window entitled "Opening forumdisplay.php"
with the description
"The file "forumdisplay.php" is of a type application/x-httpd-php, and
SeaMonkey does not know how to handle this file type. This file is
located at
http://www.benelliforum.com
What should SeaMonkey do with this file?
Open it with []
Save it to disk"

SeaMonkey build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17 (Ubuntu-1.1.17+nobinonly-0ubuntu0.9.04.1)
In both browsers, cancelling the pop-up window, & re-clicking on the link, will usually result in the browser following the link correctly.

Opera appears to be fine (so far). Haven't tried IE


Reproducible: Sometimes

Steps to Reproduce:
1.Open www.benelliforum.com/forum
2.log on
3.click away. Sometimes it happens immediately, others, after clicking on 20 odd links.
Actual Results:  
popup window appears randomly

Expected Results:  
link should always be followed
(In reply to comment #0)
> application/x-httpd-php

This is a bogus mime type that shouldn't reach the client, so apparently this is an issue on the server side.
Component: Theme → File Handling
Product: Firefox → Core
QA Contact: theme → file-handling
Once it happens for a link, does it keep happening for that link?

It's hard to tell whether the type is coming from the server or being sniffed by us, for what it's worth.  What do your OS MIME preferences map the ".php" extension to?
(In reply to comment #1)
> (In reply to comment #0)
> > application/x-httpd-php
> 
> This is a bogus mime type that shouldn't reach the client, so apparently this
> is an issue on the server side.

I suspect you are right DG. I'll contact the site manager, just in case SeaMonkey & Firefox are being (correctly) pedantic, & Opera is being lax.
(In reply to comment #2)
> Once it happens for a link, does it keep happening for that link?
>
Not necessarily. I have seen it do this twice in succession, but generally, when the window is closed, a second attempt follows the link as you would expect.

> It's hard to tell whether the type is coming from the server or being sniffed
> by us, for what it's worth.  What do your OS MIME preferences map the ".php"
> extension to?

 In Firefox, Preferences->Applications there is no mention of PHP files (as, I guess, you would expect, since, as I understand php, it's supposed to be processed at the server end)

 The only other mime types defined for the OS, I've found in /usr/share/mime/packagesfreedesktop.org.xml. Can you lead me a little here? I'm by no means an expert on Linux. Where should I look?
On Linux... <sigh>.

~/.mime.types, /etc/mime.types, ~/.mailcap, /etc/mailcap, any additional mailcap files that your MAILCAP and PERSONAL_MAILCAP environment variables point to, whatever your "helpers.global_mailcap_file", "helpers.private_mailcap_file", "helpers.private_mime_types_file", and "helpers.global_mime_types_file" preferences are set to, plus whatever gconf reports in its settings.  I don't know where it stores that information; we get it using the gnome_vfs_mime_type_from_name API...
(bare with me, I'm in over my head)

Firefox -> about:config

helpers.global_mailcap_file;/etc/mailcap
helpers.global_mime_types_file;/etc/mime.types
helpers.private_mailcap_file;~/.mailcap
helpers.private_mime_types_file;~/.mime.types

/etc/mailcap:
no reference to php

/etc/mime.types:
application/x-httpd-php				phtml pht php
application/x-httpd-php-source			phps
application/x-httpd-php3			php3
application/x-httpd-php3-preprocessed		php3p
application/x-httpd-php4			php4

~/.mailcap:
file does not exist

~/.mime.types:
file does not exist

environment variables MAILCAP and PERSONAL_MAILCAP ?
/etc/environment:
no reference to these variables

/etc/profile:
no reference to these variables

/etc/bash.bashrc:
no reference to these variables

gconf-editor search revealed no reference to MIME or PHP
OK.  So your /etc/mime.types would cause us to detect a .php URL for which the server sends no MIME type at all as application/x-httpd-php.  So it could be that the server just sends no MIME type for some reason sometimes and we misdetect the type of data in those cases.... that would depend on the exact data being sent, if nothing else.
I think I'm getting this same error on the Mac with today's Minefield.

This link:
http://www.thinkoutsidein.com/blog/2010/07/data-behind-real-life-social-network/

Asks me if I want to save the type: application/x-httpd-php

It happens every time I try the link.
Bryan, does that happen in safe mode?
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.