you have choosen to open php file

I started having his problem with my local virtual host site in XAMPP. Every time I go to php file, it ask me to download the file. I search for solution online, some suggested add module to httpd.conf in xampp but that was of no help.

Turn out it was the .htaccess file. While updating my local directory from remote, I over wrote my local htaccess file and I started getting this error. Firefox would display prompt, do you want to download the php file. Safari on Mac would download the file automatically. After I restored the original .htaccess, the problem is resolved.

Note: If your other site is working but one site is not working, this is most likely the root cause of the problem. Other suggestions are use http://yoursite.test, which may solve the problem as well some user reported.

This entry was posted in Tutorials/Tips. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s