PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, March 7, 2022

[FIXED] Prompted to download when opening PHP files in firefox

 March 07, 2022     firefox, mamp, php     No comments   

Issue

I'm working through a PHP tutorial and I'm having issues because I can't open local php files in firefox. I just get prompted to open them with another program. I'm using a mac, btw. Things I've tried/already know:

  • Deleting the mimetype.rdf file
  • Control+clicking the file and choosing to open with firefox. won't work because firefox is always grayed out.
  • I do have a local webserver installed. I've been having troubles with the native Mac local webserver, so I installed MAMP and I can serve up javascript files just fine.
  • I came across something about removing php from your download actions, but I can't seem to find anything about what that actually means or how to do it.

I've been looking all over the internet for a solution to this, it seems really crazy to me that I can't find anything. I know there are some similar questions posted on here, but they all seem to have particular aspects that don't apply to my case. I also found something about this on the MAMP forums but it was never resolved from back in 2008. Anyone?


Solution

I worked through these instructions to solve a problem I was having with setting up my local Sites directory after upgrading Yosemite and then I could actually open the PHP file. Then I had to go to my httpd.conf file in /etc/apache2 and uncomment LoadModule php5_module libexec/apache2/libphp5.so to get the PHP to actually load.

For a summary of what is included in the instructions for setting up apache after upgrading to Yosemite, see my answer in this post .



Answered By - kacmcgrath
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing