I need PHP5.6 as there is an older intrasite that uses a library not compatible with newer versions.
I need PHP7.4 as this is what is currently running our public site and I need a staging area to create a duplicate of the site for testing.
I also want PHP8. All new programing will be tested here.
I almost got it working.
What I've done:
Installed latest version of xamp with PHP8.02
Downloaded php5.6 and 7.4 and created their own folder under xamp.
The setup allows for a directory to be run on a specific version of PHP
E.G. I have a Reports folder that needs to run on PHP5.6, the wordpress folder should be on 7.4 and everything else on 8.
After some online searching, I added the following to the Apache(httpd-xamp.conf) file:
- Code: Select all
ScriptAlias /php56 "C:/xampp/php56"
Action application/x-httpd-php56-cgi /php56/php-cgi.exe
<Directory "C:/xampp/php56">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "C:/xampp/htdocs/Reports">
<FilesMatch "\.php$">
SetHandler application/x-httpd-php56-cgi
</FilesMatch>
</Directory>
ScriptAlias /php74 "C:/xampp/php74"
Action application/x-httpd-php74-cgi /php74/php-cgi.exe
<Directory "C:/xampp/php74">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "C:/xampp/htdocs/wordpress">
<FilesMatch "\.php$">
SetHandler application/x-httpd-php74-cgi
</FilesMatch>
</Directory>
I tried to run the Reports folder, Error log shows it couldn't find the extensions, but it was looking for php\ext not php56\ext.
I then changed the following enrty at the top of the file:
- Code: Select all
SetEnv PHPRC "\\xampp\\php"
to:
- Code: Select all
SetEnv PHPRC "\\xampp\\php56"
This allowed both PHP5.6 and 8 folders to work but not PHP7.4
If I change it to:
- Code: Select all
SetEnv PHPRC "\\xampp\\php74"
then 7.4 and 8 works but not the 5.6 folder.
Any way I can get all three version to work?