Xampp Older Version
Why switch between PHP versions when you can use multiple PHP version at a same time with a single xampp installation? With a single xampp installation, you have 2 options:
Xampp Php Versions
Download XAMPP for Windows, Linux, and OS X. Older versions of Solaris are also available. I have a website running on my webhost and locally on a Linux server. I'm having some problems that may be related to the MySQL versions - 5.0.51b on the local xampp server and 4.1.20 on the live site. Is there a way to load up an older version of MySQL without breaking xampp to test this? XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. The program is released under the terms of the GNU General Public License and acts as a free web server capable of serving dynamic pages.
- Run an older PHP version for only the directory of your old project: This will serve the purpose most of the time, you may have one or two old projects that you intend to run with older PHP version. Just configure xampp to run older PHP version only for those project directories.
- Run an older PHP version on a separate port of xampp: Sometimes you may be upgrading and old project to latest PHP version when you need to run the same project on new and older php version back and forth. Then you can set an older PHP version on a different port (say 8056) so when you go to
http://localhost/any_project/
xampp runs php 7 and when you go tohttp://localhost:8056/any_project/
xampp runs php 5.6.
Lets set it up.
Step 1: Download PHP
So you have php 7 running under xampp, you want to add an older php version to it, say php 5.6. Download the php zip archive from here and extract the files under c:xamppphp56
.
Step 2: Configure php.ini
Open c:xamppphp56php.ini
file in notepad. If the file does not exist copy php.ini-development
to php.ini
and open it in notepad. Then uncomment the following line:
Step 3: Configure apache Realflight 7 dongle emulator.
Open xampp control panel, click config button for apache, and click Apache (httpd-xampp.conf)
. A text file will open up put the following settings at the bottom of the file:
Note:You can add more versions of PHP to your xampp installation following step 1 to 3 if you want.
Step 4 (option 1):[Add Directories to run specific PHP version]
Now you can set directories that will run in php 5.6. Just add the following at the bottom of the config file to set directories.
Download Xampp Version 3.2.2
Step 4 (option 2):[Run older PHP version on a separate port]
Now to to set PHP v5.6 to port 8056 add the following code to the bottom of the config file.
Finish: Save and Restart Apache
Xampp Version 7
Save and close the config file, Restart apache from xampp control panel. If you went for option 2 you can see the additional port(8056) listed in your xampp control panel.
Older Version Of Xampp
Reference: