8 ก.พ. 2564

How to install two PHP versions in Window XAMPP?

Step 1: Download PHP 5.6 (Non Thread Safe) version

Step 2: Extract the zip file and copy into XAMPP folder

Image for post

Step 3: Configure php.ini file
Open C:\xampp\php5_6\php.ini. If the file does not exist, rename php.ini-production into php.ini. Open the file with notepad and uncomment the following line (just remove “#”).

Step 4: Configure Apache
Open xampp control panel, Click config button and click Apache (httpd-xampp.conf).

Image for post
Image for post

It will open httpd-xampp.conf text file from C:\xampp\apache\conf\extra\, put the following settings at the bottom of the file:

Step 5: Set different port number for php5_6
In my setting, Use port 8888for php 5.6

Step 6: Save the file and restart Apache service. Click Stop and Start

Image for post

Now, you can run your projects on older PHP version with port 8888.

*** Don’t forgot to enable required extensions in php.ini file. ***

Image for post

ไม่มีความคิดเห็น:

แสดงความคิดเห็น