How to change php from 7.1.1 to 5.6 in xampp 7.1.1?

I want to upgrade php version from 7.1.1 to 5.6 in xampp 7.1.1. But I cannot find any opportunity. Xampp PHP information

+19
source share
10 answers

I think the safest way to migrate from PHP7 to PHP5 in Xampp is:

  1. Download the self-packaged version of Xampp with PHP5 from here (today it is xampp-win32-5.6.37-0-VC11.zip ).

  2. Rename the php folder to php7 in Xampp.

  3. Now copy the php folder from xampp-win32-5.6.37-0-VC11.zip to the Xampp installation folder.

  4. Make a backup copy of the file \xampp\apache\conf\extra\httpd-xampp.conf .

  5. Replace also this file from xampp-win32-5.6.37-0-VC11.zip .

  6. Thus, configuration files (including php.ini ) have settings from the Xampp command.

It should be noted that please download the PHP 5 and 7 Xampp packages released at the same time.

Let me know if I miss something.

+14
source

If you want to downgrade php from 7.1.1 to 5.6 in xampp, follow these steps (for Windows): -

  1. Go to https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.36/
  2. Download and unzip the xampp-win32-5.6.36-0-VC11.zip file, see image image 1
  3. Delete the php folder and apache folder located in C: \ xampp

  4. Copy the php folder and apache folder from the extracted file and paste it into C: \ xampp

  5. . Add " C: " in front of \ xampp \ on line 709 , 734 , 816 , 937 , 1428 , 1462 , 2025 , 2034 to the php ini file present in the php folder.

  6. Launch Apache and MySQL and check the php version. Will show php 5.6.36

+7
source

Just uninstall this xampp and download 5.6 version .

+4
source

There is no way to downgrade XAMPP. XAMPP is hardcoded with a specific version of PHP to ensure that all modules are compatible and working correctly. However, if your project requires PHP 5.6, you can simply install an older version of XAMPP with PHP 5.6 packed into it.

Source: How to upgrade php from 5.5 to 5.3

+3
source

XAMPP is an integrated package, and you cannot downgrade or modify one of its components, such as php. (There are some solutions you can use, but there is little chance that everything will work fine.)

You can download the package from these links:

You needed to download the old sourceforge.net package form.

+2
source

Modify the .htaccess code to upgrade to PHP 5.6:

 AddHandler application/x-httpd-php56 .php 
+1
source

You can do what you ask. You can load PHP and just change your configuration file to the folder you need. As seen in another post here SO.

+1
source

You do not need to install another version of Xampp. I managed to use PHP 5.6 on my version of Xampp PHP 7. Here is what you need to do to make it work:

  • Raname (backup) <XAMPP_DIR>\php to <XAMPP_DIR>\php~7
  • Copy (backup) <XAMPP_DIR>\apache\conf\extra\httpd-xampp.conf to <XAMPP_DIR>\apache\conf\extra\httpd-xampp~7.conf
  • Download PHP5 and unzip it to <XAMPP_DIR>\php
  • Change <XAMPP_DIR>\apache\conf\extra\httpd-xampp.conf and change all php5 entries to php7 . You need to change php7apache2_4.dll to php5apache2_4.dll , php7ts.dll to php5ts.dll and php7_module to php5_module
  • Make sure all your paths are correct as extension_dir in php.ini .

Restart Apache and voila.

+1
source

If you want to downgrade php just edit your .htaccess file. As you want to downgrade php version to 5.6, just add this to your .htaccess file

 <FilesMatch "\.(php4|php5|php7|php3|php2|php|phtml)$"> etHandler application/x-lsphp56 </FilesMatch> 
0
source

I tried to do the same, so I downloaded the version of XAMPP.7zip with php 5.6.33 from https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.33/

then follow the instructions below: 1. rename c: \ xampp \ php to c: \ xampp \ php7 2. rename C: \ xampp \ apache \ conf \ extra \ httpd-xampp.conf to httpd-xampp7.OLD 3. copy the folder php from the XAMPP_5.6 7zip archive to the c: \ xampp \ 4. folder copy the httpd-xampp.conf file from the XAMPP_5.6 7zip archive to C: \ xampp \ apache \ conf \ extra \

open the xampp control panel and start Apache, and then go (I use port 82 instead of 80 by default) http: // localhost and then click PHPInfo to see if it works properly.

Opening localhost shows a toolbar

Opening phpinfo shows version 5.6

-1
source

Source: https://habr.com/ru/post/1266059/


All Articles