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 atC:\xampp\htdocs\
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 shouldwork 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:\xampp\php\, overwriting the contents of this directory with the new files.
- Open the file C:\xampp\apache\conf\extra\httpd-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:\xampp\php\php.ini with C:\xampp\php\php.ini-dist
Uncomment the lines:
;extension=php_mbstring.dll ;extension=php_pdo_sqlite.dllReplace the line
magic_quotes_gpc = Onwith
magic_quotes_gpc = Off
- Copy all files in the C:\xampp\php\ to C:\xampp\apache\bin\ (do not copy the subdirectories or their contents).
After following the above steps, restart your Apache service (this can be done using C:\xampp\xampp-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.