This section describes how to configure Apache server to support PHP CGI scripts.
With both PHP 5 and Apache 2 installed on my Windows system, I continued to configure
the Apache server to support PHP CGI scripts:
1. Open the Apache configuration file, \local\apache\conf\httpd.conf, in a text editor
2. First I have to define a CGI script directory alias, mapping an Apache document directory
to a real directory where php-cgi.exe is located. Go to alias_module section and add one line:
5. The last setting is to tell Apache to serve the new MIME type with php-cgi.exe located in the directory alias /cgi-bin-php/:
At the root level below the LoadModule section, define an "Action" entry:
6. The configuration changes are done. Now restart the Apache server by clicking
Start > All Programs > Apache Server 2.2.4 > Control Apache Server > Restart.
Another way to integrate Apache with PHP is to set PHP as a load module. This is more efficient than the CGI script interface.
But for my personal testing purpose, the CGI script interface is good enough.