Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2023
    Location
    Hounslow
    Posts
    79
    Plugin Contributions
    0

    Default A way of switching between version of PHP / MySQL on the fly in XAMPP on LocalHost

    Hi,

    I hope this will help someone as it has for me, having to switch version for different project's/clients to match live server versions.


    1. make a new folder called "mysql_xx.xx.xx" (xx.xx.xx the version number ie 10.4.28),
    2. make a new folder called "mysql"
    3. get the mysql version you need from https :// mariadb.com/downloads/
    4. select what you need, then download it,
    5. move #1 to root of your XAMPP,
    6. move #2 into #5,
    7. move all the content of the downloaded new version #4 into folder #2,
    8. start and stop "Apache" and "MySQL",
    9. rename folder "mysql" in XAMPP root to mysql_xx.xx.xx (xx.xx.xx it's version number),
    10. make a new folder within the folder root #9 called "mysql",
    11. move all content in folder #9 except "mysql" into the folder "mysql,
    11. move the folder called "mysql" from folder #5 in your XAMPP root,
    12. rename folder #5 to "mysql_xx.xx.xx~" (just adding "~" to the end this will remind you later which version you are using and the folder should be empty),
    13. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    14. copy files: "resetroot.bat","mysql_uninstallservice.bat" and "mysql_installservice.bat" from folder root #10 to folder root #11,
    15. copy folders: "scripts","data" and "backup" from folder root #10 to folder root #11,
    16. copy file: "my.ini" from folder "bin" within folder root of #10 to folder "bin" within folder root #11,
    17. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    18. delete all files except file call "ibtmp1" within folder root #11,
    19. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    20. delete all content (yes files and folders all) within folder root #11,
    21. copy all folders within folder called "backup" within folder root #10 to folder called "data" within folder root #11,
    22. start and stop "Apache" and "MySQL",
    23. if everything has been done it should not show any errors.
    24. now if you want to change back or switch between version now all you have to do is stop the server move the "mysql" folder from XAMPP root to its "mysql_version" folder, remove the "~" from it's folder name (to show it's not in use), then move the folder named "mysql" out of whichever version you want to use add the "~" to show which version is in use, then start the server and all should work, and if you have a new version you need to add just redo steps #1 to #23.


    NOW BEFORE YOU RUN OFF AND FOLLOW THIS WITH PHP DO NOT IT WILL NOT WORK IT IS DIFFERENT.


    now for a similar switching system as the above this is what you need to do:
    1. got to https :// sourceforge.net/projects/xampp/files/,
    2. select the type of Xampp you have (I use "XAMPP Windows") click your one,
    3. select the PHP version you wish to install and click it,
    4. now select the one you need BUT DO NOT SELECT "????installer.exe" (as we only need part of the system) select only a zip or 7z format,
    5. download it,
    6. unpack the download,
    7. make a folder named "php_xx.xx.xx" for each version you need including the current version like we did for MySQL,
    8. move the "php" folder in XAMPP root to it folderversion remove the "~" to its name,
    8. open the unpacked download, select the PHP folder,
    9. and move it to the XAMPP root and add the "~" to it's folderversion folder so you know the current version in use,
    10. all should be working to see it is go to PHP info page,
    11. now like mysql you can switch between version quickly.

    now enjoy.

    and if this has help you please post a think you.

    P.S. please DO NOT PM me just here.
    Last edited by OJ_SIMON; 20 Feb 2024 at 11:28 PM.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,501
    Plugin Contributions
    88

    Default Re: A way of switching between version of PHP / MySQL on the fly in XAMPP on LocalHos

    FWIW, I've been using this (https://stackoverflow.com/questions/...sions-in-xampp) SO posting as a guide for many years now. That enables me to go to localhost:8074/site1 to test PHP 7.4 and localhost:8083/site1 to test the same site on PHP 8.3 without any Apache/MySQL restart.

  3. #3
    Join Date
    Nov 2023
    Location
    Hounslow
    Posts
    79
    Plugin Contributions
    0

    Default Re: A way of switching between version of PHP / MySQL on the fly in XAMPP on LocalHos

    Can I ask if you say you don't need to restart then don't you need each version connected to each port always running? so that could be 3 or 4?

    also each combination of PHP and MySQL has to be setup?

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,501
    Plugin Contributions
    88

    Default Re: A way of switching between version of PHP / MySQL on the fly in XAMPP on LocalHos

    Multiple PHP versions, always available via localhost port specification, running with a single version of MySQL.

  5. #5
    Join Date
    Nov 2023
    Location
    Hounslow
    Posts
    79
    Plugin Contributions
    0

    Default Re: A way of switching between version of PHP / MySQL on the fly in XAMPP on LocalHos

    made a typo sorry here is the right version:

    Hi,


    I hope this will help someone as it has for me, having to switch version for different project's/clients to match live server versions.




    1. make a new folder called "mysql_xx.xx.xx" (xx.xx.xx the version number ie 10.4.28),
    2. make a new folder called "mysql"
    3. get the mysql version you need from https :// mariadb.com/downloads/
    4. select what you need, then download it,
    5. move #1 to root of your XAMPP,
    6. move #2 into #5,
    7. move all the content of the downloaded new version #4 into folder #2,
    8. start and stop "Apache" and "MySQL",
    9. rename folder "mysql" in XAMPP root to mysql_xx.xx.xx (xx.xx.xx it's version number),
    10. make a new folder within the folder root #9 called "mysql",
    11. move all content in folder #9 except "mysql" into the folder "mysql,
    11. move the folder called "mysql" from folder #5 in your XAMPP root,
    12. rename folder #5 to "mysql_xx.xx.xx~" (just adding "~" to the end this will remind you later which version you are using and the folder should be empty),
    13. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    14. copy files: "resetroot.bat","mysql_uninstallservice.bat" and "mysql_installservice.bat" from folder root #10 to folder root #11,
    15. copy folders: "scripts","data" and "backup" from folder root #10 to folder root #11,
    16. copy file: "my.ini" from folder "bin" within folder root of #10 to folder "bin" within folder root #11,
    17. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    18. delete all files except file call "ibtmp1" within folder "data" folder root #11,
    19. redo #8 (yes MySQL will auto stop and show a error but we need it to),
    20. delete all content (yes files and folders all) within folder "data" folder root #11,
    21. copy all folders within folder called "backup" within folder root #10 to folder called "data" within folder root #11,
    22. start and stop "Apache" and "MySQL",
    23. if everything has been done it should not show any errors.
    24. now if you want to change back or switch between version now all you have to do is stop the server move the "mysql" folder from XAMPP root to its "mysql_version" folder, remove the "~" from it's folder name (to show it's not in use), then move the folder named "mysql" out of whichever version you want to use add the "~" to show which version is in use, then start the server and all should work, and if you have a new version you need to add just redo steps #1 to #23.




    NOW BEFORE YOU RUN OFF AND FOLLOW THIS WITH PHP DO NOT IT WILL NOT WORK IT IS DIFFERENT.




    now for a similar switching system as the above this is what you need to do:
    1. got to https :// sourceforge.net/projects/xampp/files/,
    2. select the type of Xampp you have (I use "XAMPP Windows") click your one,
    3. select the PHP version you wish to install and click it,
    4. now select the one you need BUT DO NOT SELECT "????installer.exe" (as we only need part of the system) select only a zip or 7z format,
    5. download it,
    6. unpack the download,
    7. make a folder named "php_xx.xx.xx" for each version you need including the current version like we did for MySQL,
    8. move the "php" folder in XAMPP root to it folderversion remove the "~" to its name,
    8. open the unpacked download, select the PHP folder,
    9. and move it to the XAMPP root and add the "~" to it's folderversion folder so you know the current version in use,
    10. all should be working to see it is go to PHP info page,
    11. now like mysql you can switch between version quickly.


    now enjoy.


    and if this has help you please post a think you.


    P.S. please DO NOT PM me just here.

 

 

Similar Threads

  1. v154 Xampp Localhost Plugin Install
    By resqjoc in forum Installing on a Windows Server
    Replies: 0
    Last Post: 12 Dec 2015, 01:56 AM
  2. What is the best XAMPP version to use?
    By eminentonline in forum Installing on a Windows Server
    Replies: 3
    Last Post: 26 Mar 2009, 08:52 PM
  3. Installing on XAMPP localhost
    By boba in forum Installing on a Windows Server
    Replies: 1
    Last Post: 2 Sep 2008, 06:04 PM
  4. Switching php version in WAMP5 causes install to run
    By GreggShort in forum Installing on a Windows Server
    Replies: 2
    Last Post: 27 Jul 2007, 06:06 AM
  5. Switching the way my product listing looks
    By v.kirk in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 3 Jul 2006, 04:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR