Search code examples
mysqlapachexampp

Multiple xampp installations for multiple php versions


I have configured two Xampp servers in different drives. I have Xampp for php 7.4 and php 8 in C drive and D drive respectively. Previously, before installation of the xampp in the D drive, I have configured FastCGI on xampp server, the one in C drive, for running project of php 5.6 version. Hence I used to use php 5.6 and 7.4 both on C drive xampp server.

The fact is, the apache and mysql services are registered in WINDOWS 10 registry, where the ImagePath for both services is set at

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

Whenever we START the apache and mysql services from Xampp server it checks for the respective ImagePath in the Windows registry to run both the services.

The issue is, After configuration of second xampp in D drive, I have to manually change the ImagePath="C:\xampp\apache\bin\httpd.exe" -k runservice of Apache2.4 and ImagePath=C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql of mysql services which is getting a bit hectic as I have to run multiple projects of different PHP versions at the same time.

I need to know any way around for this if anyone has !


Solution

  • The setup i use for my preference and work is,

    Xampp (latest) 8.2

    Laragon(maintains multiple php versions)

    On xampp i use database and on laragon i use php.

    In this manner i get to run single database against any php version.

    2nd i get multiple version of php on just a single click. Yes ot takes time to make this environment first but it's good. I have on my system 5.6, 7.0,7.2,7.3,7.4,8.0,8.2