6

I am working on an older project that uses functions not supported by the newer PHP version included in my version of XAMPP.

I want to temporarily change to an older version of PHP, so I'm looking for a way to switch between PHP versions in XAMPP.

Unfortunately, refactoring to use the newer version of PHP is not an option.

3
  • what are these old functions exactly? Commented Sep 30, 2012 at 14:46
  • 1
    I know this isn't helpful, and you don't want me to say this, but I'm going to do it anyway: If a function is deprecated, in most cases there were good reasons for doing so... For some cases there are scripts out there to help you replace all the calls to deprecated functions out there, and switching back to an older php version is only going to solve your problem once, on 1 machine... That just doesn't feel right to me Commented Sep 30, 2012 at 15:00
  • I know what you mean, but sometimes the client just isnt willing to pay much... And I know wamp offers seemless php version switch, was hoping xampp did too..... dont use wamp since xampp is (arguably) in many cases more reliable and "professional".... Commented Oct 3, 2012 at 5:50

4 Answers 4

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

ALthough a really difficult solution, not worth the effort, but I guess it's a solution... :)...
1

I did following steps on Windows:

  1. Download your XAMPP with your desired PHP version (the VC-11.zip version)

  2. Unzip on C:/xamppXXXX/ (XXXX -> Your PHP version, for example), so you'll have both C:/xampp/ (your first installed version) and the new.

3a. Find in all .conf, .ini, .bat files from the xamppXXXX folder /xampp/ and replace for C:/xamppXXXX/. You can use any IDE like SublimeText to find the string.

3b. Find in all .conf files from the xamppXXXX folder \xampp\ and replace for \xamppXXXX\

  1. You can start MySQL from your installed version control panel and open the C:/xamppXXXX/xampp-control.exe and launch Apache from this one.

I did this with php7 installed and php5 from zip and working fine. Opening different instances of XAMPP Control Panel is the best way to have all databases together and not losing them between versions.

Comments

0

Dont' use XAMPP for this. Use MAMP. It's a single click

enter image description here

1 Comment

Unfortunately there is no support for MySQL version changes.
0

If you're using XAMPP on Windows, there is one repository that can help you manage PHP and Apache versions: https://github.com/lankryf/peach. You can check the README file for more information.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.