A popular debate is how to run 2 versions of PHP at the same time. This extract shows two ways to achieve this. Requirements: Apache 2x installed; PHP versions.
This assumes that you have followed the steps outlined in the other articles in this section. In this example we will add PHP6 to the existing installation of PHP5.2.x.
The first step is to download PHP6. The binaries come without an installer, so just extract all files to a folder of your choice.
To follow previous articles, I have set the install path as X:\Program Files\Apache Group\php\php-6.0.0-Win32. If you have already created hosts.conf open it using a text editor, wordpad or notepad, and add a few lines. The file, from the default installation is found in the X:\Program Files\Apache Group\Apache2\conf folder. If you haven't created the file, just open up your httpd.conf.
Without any further changes to these conf files, you can add the following to get PHP6 running simultaneously as a CGI with PHP5 already running as a module.
Thanks to Thierry for this tip.
That's it basically. Make changes to your php.ini file as required. Restart Apache, make a test page and see what you get over port 81. You can of course add more here, but the first 4 lines are the important part.
Alternatively, to run PHP as a CGI through the default port, you can add the following instead. Note the AddHandler extension.
Comments
Remember to configure php.ini
You must remember to configure php.ini too for PHP6.