2

My question is simple: how to update PHP in Xampp withouts reinstallation? Current PHP version is 7.1.1

I have tried the following:

downloaded thread-save and non thread safe versions, extracted them in php and then replacing php.ini with older version Copied all directories which are not in updated verion answers from Upgrading PHP in XAMPP for Windows? second answer from Upgrade PHP on XAMPP 1.8.3 windows 7 installation Because Laravel requires newer versions every few weeks i would consider updating just php rather than Xampp itself.

The question is what is the best way to manage PHP versions withouth reinstalling Apache server? I need specific version because of software specifications

Matej J
  • 615
  • 1
  • 9
  • 33
  • https://stackoverflow.com/questions/2154762/upgrading-php-in-xampp-for-windows – Kevin Jul 04 '19 at 06:35
  • Please read entire post. I dont want to reinstall Apache – Matej J Jul 04 '19 at 06:37
  • 1
    This might help you, this one talks about having multiple version of php at the same time, but can be used to understand how to update/downgrade a version of php as well... https://stackoverflow.com/questions/45790160/is-there-way-to-use-two-php-versions-in-xampp/49586592#49586592 – Igor Ilic Jul 04 '19 at 06:37
  • the problem is you're not considering answers inside, there is clearly a way to just upgrade php alone, its inside one of the answers. – Kevin Jul 04 '19 at 06:38
  • here's the answer i used before https://stackoverflow.com/a/26483387/3859027 and it worked. i was using windows 10 though i don't think it has any bearing with the version of windows OS – Kevin Jul 04 '19 at 06:42
  • @IgorIlic interesting, never thought you could have different versions on different ports.. – Matej J Jul 04 '19 at 06:42
  • 1
    Yes you can, I currently have about 3-4 different versions running in case I need to test how the app works on different version. Or if I receive an old code that doesn't run on php7+ – Igor Ilic Jul 04 '19 at 06:43

1 Answers1

0

As @IgorIlic mentioned, one of the options is to setup different versions on different ports.

The other option would be to change PATH value, which points to PHP installation. Just edit the line and change it to version that you require.