Update or replace PHP in Apache XAMPP withouth reinstalling Apache - php

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

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.

Related

How to install Debian 7 and PP5 in 2020?

I have an old installation of TYPO3 (6.4) and I want to move it to another supplier. I can export everything but I cannot install a working server that can run the applications from the old website.
I am sure it has something to do with PHP and my solution I think would be to install PHP 5.4.4 on either Debian 7 or a newer Debian distribtion.
Can anyone help me out? Thank you :)
There never was a TYPO3 version 6.4. maybe 6.0.4 or 6.2.4 ?
you can try to install a virtual maschine with an old linux image with that old PHP version.
But that should be only local and only for viewing the old site.
In general you don't need a working server as all neccessary data is in the database (and filesystem).
Install a TYPO3 verion 7 (also outdated, but runs on PHP 7.2) as an intermediate step and insert a copy of the old database and the filesystem (fileadmin/*). Then run upgrade wizard (do an upgrade for all extensions as possible)
Repeat for TYPO3 versions 8, 9 until your database is converted to latest version and matching extensions.
Meanwhile you probably need to change the rendering as the old installation was probably based on CSC (css_styled_content) while there is FSC (fluid_styled_content) which resuls in other HTML markup and other CSS.
Or was it even a 4.6?
Then you need a prior step with TYPO3 6.2 to convert all file references to FAL. therefore you need an old PHP 5.6 to execute the upgrade wizards. (stay with a local virtual machine)

adding newer version of PHP to XAMPP versus upgrading to newer version of PHP

In my development environment, on Windows, I'm running XAMPP with PHP 5.4.4. All of the projects in my htdocs folder are compatible with PHP 5.4.4. Presently, only one of these projects needs to be refactored to work on PHP 7.3.4.
This post describes how to upgrade to a newer version of PHP; however, I don't want to replace the 5.4.4 version that's already installed. Instead, I want to add the 7.3.4 version so it's possible to choose which PHP version to run for each project.
This post describes how to install an older version of PHP alongside a newer version and how to run multiple versions of PHP on a single installation of XAMPP. This is closer to what I want to achieve. Instead of installing an older PHP version, I'd be installing a newer one. Are there any reasons that the base PHP version that's installed should be the newest version?
Edit: I would like to set up my environment so the different PHP versions run on different ports, as described by the second post listed above. In other words, I don't want to modify Apache's httpd.config file each time the PHP version is to be switched.

Is there a way to run PHP version 5.4 w/ the latest MAMP version

I have the latest version of MAMP installed but i want it to run PHP version 5.4.
That version is included in the MAMP file dir. It is located…
-> bin/php/php5.4.42
but in the preferences pane there are only 2 PHP version options: 5.6.10 and 7
I want to do this a part of troubleshooting. i have a Drupal install and am getting the dreaded ‘White Screen of Death’. I’m trying anything and everything to get it working!
MAMP lets you choose from the last two versions of PHP installed in bin/php. If you want to use 5.4.42, just leave this folder and another one of your choice inside this directory (move the others somewhere else so you have a copy, just in case). When you restart MAMP you'll be able to choose your preferred PHP version in the Preferences.
You can download more versions at https://www.mamp.info/en/downloads/
The easier way is to use other localwebserver called Ampps, and after installing it you can choose the version you want by the simple interface it provide.
You click on PHP ==> Change PHP version, and it will show you versions from 5.3 to 7.0.
Here is the link: http://www.ampps.com/
Thanks a lot.

The program can’t start because php5ts.dll is missing from your computer [duplicate]

This question already has answers here:
program cant start because php5.dll is missing
(9 answers)
Closed 6 years ago.
I have a Win 2008 r2 server that has been running PHP 5.3 and convinced client to upgrade to 5.6.19 which is the latest available at the time of this post. This instance runs Apache 2.2.
Because I want to keep this instance lean but able to move back to 5.3 if I failed I downloaded the non-thread-safe version. I've updated the soon-to-be commissioned php.ini (formerly the example production file) to be aligned with the params in the 5.3 php.ini. Then I pointed the server's PATH from the 5.3 folder to the new one containing the 5.6.19 files. I have not attempted to run Apache yet opting instead to test that the new PHP works at least with CMD. That's when I got the above message.
It would seem the consensus of these posts:
http://www.touchoftechnology.com/the-program-cant-start-because-php5ts-dll-is-missing-from-your-computer-error/#ixzz42KMHyQFz
program cant start because php5.dll is missing
that I should rename the php5.dll file to 'ts' or 'nts' in its file name and/or add this designation in the php.ini. But I don't see where to put it in the .ini file. Renaming php5.dll (from the installation files) to php5nts.dll returns the message that php5.dll is missing. I've tried many different combinations of these filenames, and even adding a php5ts.dll from a thread-safe distribution. I can't get one without the other.
One of the posts suggests adding the 'nts' to some of the Zend extensions but I'm not running zend on this production box. Where in the php.ini do I need to set the file I got (php5.dll) to solve this? I hope once I get the CLI working that the Apache should not have this problem.
Other comments say to run Microsoft's Platform installer but that seems to introduce more things that are not needed on this production box and I do not want any extra baggage. I just want to point Windows and Apache to this newer PHP install.
I had read that for early Windows OS I should use the non-thread safe version of PHP. That version is missing the php5apache2_x.dll which caused doubt about this package. An acquaintance said to use the thread safe version which had the php5apache2_4.dll. It seemed to work in the Windows CMD browser after I set my environment variable to that folder. But digging further, it appears that I should also upgrade my Apache to 2.4 as later PHP and later Apache are using different Visual Studio compilers.

XAMPP change PHP version

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.
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.
I am really disappointed with the responses on this.
WAMP allows you to switch between PHP and MySQL versions pretty easily...
I did following steps on Windows:
Download your XAMPP with your desired PHP version (the VC-11.zip version)
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\
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.
Dont' use XAMPP for this. Use MAMP. It's a single click

Categories