WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • Tutorial: PHP-VersionsSwitcher for Xampp
  • Print
Pages: [1]   Go Down

Author Topic: Tutorial: PHP-VersionsSwitcher for Xampp  (Read 24769 times)

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Tutorial: PHP-VersionsSwitcher for Xampp
« on: January 08, 2017, 03:14:05 PM »
if you work with the locale XAMPP-Server, maybe its good, if you can switch between different PHP-Versions. The Limiter for this Switch is your Xampp-Version. So its not possible to switch to a Version PHP 5.6.x, if your package needs a Version PHP 7.x. For this case, i use different Xampp-Installations and rename the xampp-folders, before i start the server

to the switch:
WHAT YOU NEED...
- a running Xampp-Installation on your locale PC, recommened the latest version from here -> https://www.apachefriends.org/de/index.html
- a different PHP-Version, maybe from here -> http://windows.php.net/download - i use for a example VC14 x86 Thread Safe for Windows
- the PHP-Switcher  from the attachement or from here -> https://code.google.com/archive/p/phpswitch/downloads

- Unpack this Switcher-Package into your locale Xampp-Folder, it will overwrite the existing Readme-Files, choose yes or no
- you need from the package in this zip the folder called "lib", a config.ini, the file php_switchbat and php_switch.php in the Xampp-Main-Folder
- open the config.ini with a simple editor and change there the yellow marked settings, the path to Xampp, the path to the php inside of xampp and the apacheService (older Xampp-Versions has Apache 2.2)

- rename the not used php-Folder and add there the php-Version, for example a folder with PHP 7.0.14 has the Name php_7.0.14
- dont rename the folder with name php - Xampp works only with the folder php (if you dont change the original settings), the switcher rename the folders

View in Windows-Explorer / Xampp-Folder


- you need inside of every php-versions-folder a file called PHP_VERSION. Content of this file is the versions number, like 7.0.14, not more
- you need a php.ini in every php-folder - in most cases, its enough, when you rename one of the php-ini-files in the php-folder, like php.ini-development to php.ini. if its not work, try a php.ini from a working-php-version



to use the Versions-Switch, be sure, that you stop a actual running apache server in your xampp-control-panel
to start the switch, start the file php-switch.bat ( i send this file to my desktop and change the icon (use the icon from xampp for that)


a DOS-Window starts, the Script reads the different php-folders and build a list. Select the PHP-Version, tip the number and close the window.
now you can start the apache server - if no red error come, everything is good and you can work with the different version





Last step: check the used PHP-Version in WB-Backend - Systeminfo (info-Button in the top-menu)


« Last Edit: January 08, 2017, 03:19:32 PM by jacobi22 »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Off-Topic »
  • Tutorial: PHP-VersionsSwitcher for Xampp
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2