How to Change PHP Version in Xampp

XAMPP change PHP version

I would not dare to 'temporarily' shift my development machine.

I would suggest installing a virtual machine manager like VirtualBox and then install a older version of XAMPP in there.

Upgrading PHP in XAMPP for Windows?

Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.

Note:
In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.

How to install PHP 8 on XAMPP

Rewriting php8_module to php_module (all occurrences) in

"httpd-xampp.conf" file solved the Error: Apache shutdown unexpectedly problem for me :)

How to set php version for composer when having multiple xampp versions?

Finally i found the solution. I changed my composer path to new php version and now getting what i want.

Upgrading Xampp to run php 7

I consider @camelCase good, but you can also consider trying this method. It may suite your need.

Upgrade to PHP7 in XAMPP
Before proceeding further I will recommend to take backup of your XAMPP configuration. After you have made backup below are some steps to use PHP7 with in your XAMPP

  1. Download PHP7 : Download php7 from php.net website.

If your apache is thread safe then download a thread safe version of PHP7 otherwise download NTS i.e non thread safe version.


  1. Place PHP on appropriate place in your XAMPP : Put your PHP7 in your XAMPP. I usually prefer to to put on location /XAMPP/php7 but you can put as per your need. There is no any restriction for putting your new php version in xampp.

  2. Include PHP7 with your apache : In XAMPP, PHP is configured using apache file path [yourxampp/apache/conf/extra/httpd-xampp.conf]. Please open the file add first change all variable path from php7 directory.

Also do not forget to add php7 module using below code

LoadFile yourxampppath/php7/php7ts.dll
LoadFile yourxampppath/php7/libpq.dll
LoadModule php7_module yourxampppath/php7/php7apache2_4.dll

Make sure to change PHP ini directory for your PHP7

<IfModule php7_module>
PHPINIDir "yourxampppath/php7"
</IfModule>

Chechout www.techflirt.com



Related Topics



Leave a reply



Submit