Inspired by the YAIG blog, here is my how to do it
post:
XAMPP is a great suite to quickly get up and running with Apache, PHP, Perl and MySQL. Warning! It is not aimed to be used in a production environment! Its settings are geared towards ease of use rather then security!
However I went against my own advice and used it in a couple of instances, however these are not public facing sites, rather internal and heavily firewalled services. Even so whenever a security update to PHP comes out, I feel the need to use the new version. Here is how you can do it, without waiting for the official XAMPP package to update (you really can’t criticize them for not updating faster, since it is a development not a production server and as such minor PHP releases shouldn’t influence your code).
Warning! Use these instructions on your own risk. They are written to the best of my knowledge, however I can’t make any guarantees. Always backup your data.
- Download the latest binary version of PHP (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 apachebin directory with the newer versions.
- Now the trick: take the files which have a
_2
in their names (for examplephp5apache2_2.dll
orphp5apache2_2_filter.dll
), copy them in the apachebin 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.
16 responses to “Updating PHP in XAMPP for Windows”
🙂
Whoa! Thanks for the link!
thanks m8
Thanks for the guide. WIll try out on Monday.
Have been looking to upgrade my php version for a while.
Will let you know how it goes!
N?A
@Anonymous: I would be glad to help you out if you could elaborate a little more your question.
It works! Congratulations, it really helped me!
4. Overwrite the files which are already present in the apachebin directory with the newer versions.
newer versions???
@Anonymous: I'm referring to files like php5apache.dll.
works like a fortune
Hi, thanks for the guide. Although the post is quite outdated but I hope I can use it to upgrade my PHP to version 5.3.6.
Thanks again. 🙂
@bitra: hopefully it works – either way, if you have a little time, please let me know how it went.
thx, it worked. updated XAMPP 1.7.7 from php 5.3.8 to 5.3.14.
what I done is first backup the original php folder by renaming it, then extract the 5.3.14-VC9 x86 Thread Safe to the re-created php folder. Step 5 is not required to make it work. I also copied the php.ini and php/extras from the backup folder.
Can anybody help me to downgrade from 5.4 to 5.3 version of php in xampp windows platform
@Sha – why would you want to downgrade?
how can i upgrade my XAMPP for Windows without any backup
Hey can anyone tell me if this works on apache-php or not? i have do it….., but on my server around 20 people works, so i cant take any wrong step.