Having been unable to find a definitive guide to upgrading the XAMPP PHP version to PHP 5.3.0rc2, I decided to improvise on a guide for installing the PHP 5.3 alpha.
My guide will describe how to upgrade the current XAMPP PHP version to the second release candidate of version 5.3. It is expected that this method will also work for the third release candidate when it is released later this month.
Step 1: Make backups
Before starting, make sure to backup any settings, custom modules and most importantly the htdocs directory, which contains your scripts and page resources. This directory is normally located at C:xampphtdocs
Step 2: Preparation
- Download PHP 5.3.0rc2. I use the VC6 build in order to minimise any potential compatibility issues.
- It is also recommended that you download the latest Windows version of XAMPP. While this is an upgrade guide that should work with previous versions of XAMPP, it is recommended that a fresh copy of the core files is used.
- Stop any instances of the Apache service that might be running.
Step 3: The upgrade
This guide will assume your XAMPP directory is C:xampp
- Extract the XAMPP archive to a directory of your choosing, I would recommend using the default C:xampp
- Extract the contents of the PHP archive to C:xamppphp, overwriting the contents of this directory with the new files.
- Open the file C:xamppapacheconfextrahttpd-xampp.conf and ensure the following lines are present in this order:
LoadFile "/xampp/php/php5ts.dll" LoadModule php5_module "/xampp/apache/bin/php5apache2_2.dll"
- Replace C:xamppphpphp.ini with C:xamppphpphp.ini-dist
Uncomment the lines:
Replace the line
magic_quotes_gpc = On
magic_quotes_gpc = Off
- Copy all files in the C:xamppphp to C:xamppapachebin (do not copy the subdirectories or their contents).
After following the above steps, restart your Apache service (this can be done using C:xamppxampp-control.exe or manually through the control panel/command prompt). Your PHPinfo should indicate that the upgrade has been successful.
I will update this post if I discover any problems from using this method, or a cleaner (automated) means of performing the upgrade.