Fix: browser downloads PHP file instead of running it (Debian Squeeze)
Posted 01-31-2012 at 03:39 AM by catkin
This problem took nearly a day to solve so here's the solution.
The problem symptom was with nagios3. After browsing http://<server>/nagios3 and logging on, Firefox opened a download dialog with said "You have chosen to open <blank line> which is a: application/x-httpd-php".
Looking for nagios-specific solutions was not fruitful. It was only when I searched for solutions to the browser downloading PHP files instead of running them I found solutions such as this one.
It turned out I had broken the libapache2-mod-php5 installation when re-installing apache2 to get a baselined installation.
The libapache2-mod-php5 installation was fixed by purging libapache2-mod-php5 which also removed (purged?) nagios3 and its many dependencies. After re-installing libapache2-mod-php5 and then nagios3, the same problem occurred until Firefox's "Recent History" (including cookies and cache) was cleared.
The problem symptom was with nagios3. After browsing http://<server>/nagios3 and logging on, Firefox opened a download dialog with said "You have chosen to open <blank line> which is a: application/x-httpd-php".
Looking for nagios-specific solutions was not fruitful. It was only when I searched for solutions to the browser downloading PHP files instead of running them I found solutions such as this one.
It turned out I had broken the libapache2-mod-php5 installation when re-installing apache2 to get a baselined installation.
The libapache2-mod-php5 installation was fixed by purging libapache2-mod-php5 which also removed (purged?) nagios3 and its many dependencies. After re-installing libapache2-mod-php5 and then nagios3, the same problem occurred until Firefox's "Recent History" (including cookies and cache) was cleared.
Total Comments 0