Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to open a PHP file (locally) in Firefox without the "Do this automatically" box popping up every time.

I tried a bunch of different solutions on the web, they all seem pretty dated.

Any help is appreciated.

share|improve this question
Is it "open a .php file locally" i.e. by double clicking? – vWil Nov 16 '13 at 15:58
Yes. Locally as in on my local hardrive. – Joe Curcuru Nov 16 '13 at 22:24
See mimetype(1), and mimeopen(1). The mime type of the .php file can be determined using mimetype. If it is application/x-php then even if mimeopen -d is used to change the default application to Firefox, Firefox won't identify/register itself for application/x-php on the system. Also, Firefox won't be able to open it as it doesn't have a builtin php parser like with html or xml. application/x-php has to be served as HTML by a web server after the .php file (script) is processed by a PHP parser on the server. – vWil Nov 17 '13 at 8:31
I appreciate the help, but I do it all the time with windows. And if I recall, at one time this was working fine with Linux (Ubuntu) as well. – Joe Curcuru Nov 17 '13 at 9:46
I may be wrong, so please disregard my previous comment. Do you have ~/.local/share/applications/defaults.list, if so can you please temporarily delete it and check. – vWil Nov 18 '13 at 4:06

You must log in to answer this question.

Browse other questions tagged .