Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I update my version of PHP for XAMPP [duplicate]

Tags:

php

xampp

Possible Duplicate:
Upgrading PHP in XAMPP for Windows?

I am currently using XAMPP version 1.8.1 which has the PHPversion 5.4.3

I have found the latest version of PHP from the PHP site version 5.4.11, released a day ago.

Now if I download the latest PHP version from php.net and replace my current PHP directory with the latest, will it work properly/ straight away?

Thanks

like image 464
Sahasrangshu Guha Avatar asked Jan 19 '13 08:01

Sahasrangshu Guha


People also ask

How do I upgrade to a newer version of PHP?

Scroll down to the Advanced settings tile and select PHP and database settings. Scroll down to Update PHP version. Select the PHP version you want to switch to and click Update.

Can I install 2 XAMPP versions?

As two different versions of XAMPP cannot run on the same port, we need to change to the port. Steps to change the port for the XAMPP1_8_2: Open the file HTTP CONF file > change the port from the 80 to 8080. After changing the port click on save and exit.

Can I install 2 PHP version?

Add a PHP Repository By default, Ubuntu 20.04 ships with the PHP version 7.4. So you'll need to add the PHP repository in your system to install the multiple PHP versions. Once the repository is up-to-date, you can proceed to install multiple PHP versions.


1 Answers

  • Download the latest binary version of PHP 5.4.11 (make sure to get the .zip package not the installer)
  • De-archive it to a directory
  • Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
  • Overwrite the files which are already present in the apache\bin directory with the newer versions.
  • Now the trick: take the files which have a "_2" in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the "_2" part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.

Hope this helps.

like image 131
Jirilmon Avatar answered Nov 06 '22 16:11

Jirilmon