0

I need to be able to run a different version of PHP for all code under a specific directory. This is Apache 2.4 running on a Windows system.

In my conf I currently have

LoadModule php7_module "c:/php/php7apache2_4.dll"

as well as

AddType application/x-httpd-php .php

What I am looking for is

https://domain/ = PHP 7.3

https://domain/oldstuff = PHP 5.6

I found a page that said its as easy as adding a line to your .htaccess but I am not sure where I would define which version is which.

AddHandler application/x-httpd-php56 .php

Most of the examples I have found are for cgi or for linux and don't seem like they would help

Romp99
  • 1
  • https://www.dionysopoulos.me/apache-mysql-php-server-on-windows-with-multiple-simultaneous-php-versions/, https://steemit.com/cn/@jinzo/how-to-use-multiple-php-versions-with-apache-on-windows, https://codebriefly.com/how-to-handle-multiple-php-versions-with-apache-server-on-windows/ – misorude Aug 15 '19 at 07:57
  • _“Most of the examples I have found are for cgi”_ – that’s what you will have to use, multiple different PHP versions as Apache modules are not possible. – misorude Aug 15 '19 at 08:00
  • So would it be possible to use CGI for a specific directory and the module for the rest? – Romp99 Aug 15 '19 at 14:20

0 Answers0