Different PHP version per project
Is there any way I can set up a different PHP version per project? I have actually installed 7.2 and 7.1 but I want a project uses 7.1 and the other ones 7.2.
Thanks in advance
@poxxac Indeed this would be helpful. I find I'm needing older php versions to work on client sites that require older versions which I will then repair and then upgrade and push live.
@poxxac Leokhoa answered a similar question here: https://forum.laragon.org/topic/805/a-specific-php-version-for-selected-virtual-hosts/2
I am also looking into the apachelounge forums as there is some info there on using Apache modules (fcgi) to allow different PHP version per virtual host:
However, the forum post is old and I am unsure if the suggestions work in a Windows context but it may be a starting point.
This is the only thing that makes me miss Laravel Homestead so much.
@Christhofernatalius : You can install another Laragon to other folder.
@leokhoa But then if I have projects with php 5.4, 5.5, 5.6, 7.0, 7.1, 7.2 I have to install 6 Laragon instances?
That is impractical IMHO.
Anyway I'm quite happy with Laragon aside from this limitation.
@Christhofernatalius : No, you don't need to have 6 Laragon instances. You just need to switch the PHP version you want to work with (Menu > PHP > Version).
Adding another PHP version to Laragon is very easy and lightweight:
With Laragon 4.0, you can add many php download links to
Menu > Tools > Quick add > Configurationand may the adding PHP version even easier (and can be re-used when you have new machine):
php7.3=https://windows.php.net/downloads/qa/php-7.3.0RC6-Win32-VC15-x64.zip php7.2=https://windows.php.net/downloads/releases/php-7.2.12-Win32-VC15-x64.zip .... php5.4=...
Each of them just takes ~ 25MB and doesn't consume your resources.
With Homestead, you have many fat (~ 1GB) VMs running consuming your resources.