Open In App

How to run two PHP versions for two projects on same apache server ?

In this article, we will learn about running two versions of PHP on the same Apache server. To manage many domains, the Apache webserver uses virtual hosts on a single instance.

Prerequisite: We will be using the XAMPP server to use the Apache server and some knowledge to use it.



First, download the older version of XAMPP that can be of any version. The old version is XAMPP 1.8.2 and then later we install the latest version of the XAMPP. Both versions of the XAMPP will have the same apache server.

Steps:



  1. Download xampp-win32-1.8.2-6-VC9-Installer.exe

  2. Install the software.

  3. Click on the next.

  4. Change the name (better to use the XAMPP_1_8_2) so that later you will be able to differentiate between the new and old versions.

  5. Click on “install” to complete the installation process.

Configure the file httpd CONF file to change the port for the new XAMPP. As two different versions of XAMPP cannot run on the same port, we need to change to the port.

Steps to change the port for the XAMPP1_8_2:

Open the file HTTP CONF file > change the port from the 80 to 8080.



Note: You may face some problem with the port of 3306.

Change the port 3306 to 3307

Steps to change port:

Article Tags :