PHP5 CGI parallel to PHP4 module on Windows

I was looking for a way to have both PHP4 and PHP5 running on Windows. So there was a bit of adaption of the note made by seric [1] to the Windows environment (Installation/PHP5). PHP4 still works as Apache module while PHP5 runs as CGI on a port-based virtual host:

Listen 83
<Virtualhost _default_:83>
ServerName localhost
ServerAdmin me@localhost
DirectoryIndex index.html index.php
ErrorLog logs/error.log
<Location />
Order allow,deny
Allow from all
DocumentRoot \"C:/www/project-a/\"
ScriptAlias /cgi-bin/ \"C:/php5/\"
Action php5-script /cgi-bin/php-cgi.exe
AddHandler php5-script .php .html

The downloaded PHP 5.0.0RC1 zip package has been unpacked to c:\\php5. Then I renamed the php.ini-dist to php.ini and restarted Apache.


Leave a Reply