PhP file display as downloading instead of interpreted by Apache
Written on July 28, 2009 at 3:08 pm by
mkyong
While accessing the PHP file, the PhP file display as “application/x-httpd-php” downloading instead of interpreted properly by Apache. As following pop up message.

Solution
The PHP downloading issue is because the Apache didn’t load the PHP module in the configuration file.
1) Open the Apache configuration file, which locate at $APACHE_PATH/conf/httpd.conf
2) Make sure the following lines are exists in httpd.conf, and point to correct PHP module location, of course
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "C:/PHP/" LoadModule php5_module "C:/PHP/php5apache2_2.dll" #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
3) Restart it, Done.
This article was posted in Apache category.
All Java Tutorials
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery
Very cute
))),