Multiple PHP Versions For Different VirtualHosts
Posted by: ezxcess (1.128.108.---)
Date: May 22, 2019 02:37AM

I am running Wamp 3.1.9 on a Windows Pro. This is my first time using WAMP as I previous used Ubuntu but circumstances require the I run this in Windows because there are Windows applications that I need to use.

Anyway, I was wondering if there is any way for me to configure different PHP versions on a VirtualHost level. I am able to do this in Apache2 in Ubuntu but not sure if WAMP has similar methods. Its a bit tedious to change the PHP version manually as I have multiple sites running different versions of PHP, eg. 5.6, 7.2, etc...

Hope someone can help me and thank you for any help.

Regards,

Options: ReplyQuote
Re: Multiple PHP Versions For Different VirtualHosts
Posted by: Otomatic (Moderator)
Date: May 22, 2019 08:50AM

Hi,

> if there is any way for me to configure different PHP versions on a VirtualHost level
No.

But you can change PHP version "on the fly".
With a web page of a local site loaded in a browser, you can do, with the Wampmanager menu:
Left-click -> PHP -> Version -> Choose the desired version
Then, reload the web page (Ctrl-F5) and the new version of PHP will be used.

I searched in the Apache documentation but I didn't find which directive allows to change the PHP version based on the VirtualHost launched.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.41 - PHP 7.3.9/7.2.22/7.1.32/7.0.33/5.6.40 - MySQL 5.7.27 - MariaDB 10.4.7
Wampserver 3.1.9 64 bit - Apache 2.4.41 - PHP 7.3.9/7.2.22/7.1.32/7.0.33/5.6.40 - MySQL 5.7.27/8.0.17 - MariaDB 10.4.7
PhPMyadmin 4.9.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »



Edited 2 time(s). Last edit at 05/22/2019 02:13PM by Otomatic.

Options: ReplyQuote


Sorry, only registered users may post in this forum.