Step 1: Download PHP 5.6 (Non Thread Safe) version
https://windows.php.net/download#php-5.6Step 2: Extract the zip file and copy into XAMPP folder
C:\xampp\php5_6
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 “#”).
extension_dir = "ext"Step 4: Configure Apache
Open xampp control panel, Click config button and click Apache (httpd-xampp.conf).


It will open httpd-xampp.conf text file from C:\xampp\apache\conf\extra\, put the following settings at the bottom of the file:
ScriptAlias /php5_6/ "C:/xampp/php5_6/"
<Directory "C:/xampp/php5_6">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>Step 5: Set different port number for php5_6
In my setting, Use port 8888for php 5.6
Listen 8888
<VirtualHost *:8888>
UnsetEnv PHPRC
<FilesMatch "\.php$">
php_flag engine off
SetHandler application/x-httpd-php5_6
Action application/x-httpd-php5_6 "/php5_6/php-cgi.exe"
</FilesMatch>
</VirtualHost>Step 6: Save the file and restart Apache service. Click Stop and Start

Now, you can run your projects on older PHP version with port 8888.
http://localhost:8888/Project1*** Don’t forgot to enable required extensions in php.ini file. ***






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