Table of Contents

About

After downloading php, the installation instructions are in the file install.txt

Type

php as module

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

php as cgi

Integrating php as cgi will automatically send default headers such as Content-type. This is a weird behavior that seems to be manageable via the q option of the php-cgi.exe file but if you can integrate php as a module, that's better.

In the httpd.conf

ScriptAlias /php/ "C:/php-5.6.9-nts-Win32-VC11-x64/"
AddType application/x-httpd-php .php

# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"

# specify the directory where php.ini is
SetEnv PHPRC C:/php-5.6.9-nts-Win32-VC11-x64

# right
<Directory "C:/php-5.6.9-nts-Win32-VC11-x64/" >
    AllowOverride None
    Options None
    Require all granted
</Directory>