# How to install PHP on Apache?

**URL:** <https://forum.kirupa.com/t/how-to-install-php-on-apache/293953>\
**Category:** programming\
**Created:** [August 6, 2009, 9:27am UTC](https://forum.kirupa.com/t/how-to-install-php-on-apache/293953 "2009-08-06T09:27:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilbertsavier](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@gilbertsavier](https://forum.kirupa.com/u/gilbertsavier)\
**Post date:** [August 6, 2009, 9:27am UTC](https://forum.kirupa.com/t/how-to-install-php-on-apache/293953/1 "2009-08-06T09:27:33Z")

</div>

Hi,  
You need to add the following lines to httpd.conf (If you’re using Apache for Win32)

ScriptAlias /php/" c:/path-to-php-dir/"  
AddType application/x-httpd-php .php  
Action application/x-httpd-php “/php/php.exe”

Then restart Apache and it should interpret php files correctly.

For more information on installing Apache with php look at the following manual page:  
[http://www.php.net/manual/en/install.apache.php](http://www.php.net/manual/en/install.apache.php)
