How to use multiple php in Xampp

No doubt there are many natives php we use, but when it is start withn new xampp with in use php version 7.x we difficult to use that native php.
Here I wanna share to you how to use multiple php just one xampp
First you have to download the files that you need to use  here 
After downloading one of those file you have to extraxt it before you pute to xampp folder like this picture bellow :


Bellow is for apache configuration
  1. ScriptAlias /php5_6/ "C:/xampp/php5_6/"
  2. <Directory "C:/xampp/php5_6">
  3.     AllowOverride None
  4.     Options None
  5.     Require all denied
  6.     <Files "php-cgi.exe">
  7.           Require all granted
  8.     </Files>
  9. </Directory>
  10.  
  11. Listen 8056
  12. <VirtualHost *:8056>
  13.     UnsetEnv PHPRC
  14.     <FilesMatch "\.php$">
  15.         php_flag engine off
  16.         SetHandler application/x-httpd-php5_6
  17.         Action application/x-httpd-php5_6 "/php5_6/php-cgi.exe"
  18.     </FilesMatch>
  19. </VirtualHost>
  20.  
  21.  
  22. ScriptAlias /php7_1/ "C:/xampp/php7_1/"
  23. <Directory "C:/xampp/php7_1">
  24.     AllowOverride None
  25.     Options None
  26.     Require all denied
  27.     <Files "php-cgi.exe">
  28.           Require all granted
  29.     </Files>
  30. </Directory>
  31.  
  32. Listen 8071
  33. <VirtualHost *:8071>
  34.     UnsetEnv PHPRC
  35.     <FilesMatch "\.php$">
  36.         php_flag engine off
  37.         SetHandler application/x-httpd-php7_1
  38.         Action application/x-httpd-php7_1 "/php7_1/php-cgi.exe"
  39.     </FilesMatch>
  40. </VirtualHost>
Categories:
Similar Books