When I attempt to navigate to the PHP script at http://localhost/project/admin, I expect to see the script results in my web browser.
Instead, I see a dialog box for downloading the file with the message below:
You have chosen to open
<filename>
, which is a:application/x-httpd-php
from: http://localhost
What should Firefox do with this file?Open with...
•Save...
• etc.
Any idea what is going on?
PHP is not correctly installed on the server or Apache is not using mod_php
In the case of this happening in IIS. I would say that the mimetype is not setup correctly and that the server doesn't know how to handle the extension ".php"
It sounds like an incorrect Content-type
header is being sent. This header sets the mime-type for the data the browser receives and, if the browser doesn't have a handler to render that specific mime-type, it will ask to open/save the file instead.
I would start by checking your PHP file for a header()
statement and a mis-typed content-type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With