Installing PHP 5.3.0rc2 for XAMPP (Windows)

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:\xampp\htdocs\

Step 2: Preparation

  1. Download PHP 5.3.0rc2. I use the VC6 build in order to minimise any potential compatibility issues.
  2. 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.
  3. 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\

  1. Extract the XAMPP archive to a directory of your choosing, I would recommend using the default C:\xampp\
  2. Extract the contents of the PHP archive to C:\xampp\php\, overwriting the contents of this directory with the new files.
  3. 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"
  4. Replace C:\xampp\php\php.ini with C:\xampp\php\php.ini-dist
    Uncomment the lines:

    ;extension=php_mbstring.dll
    ;extension=php_pdo_sqlite.dll

    Replace the line

    magic_quotes_gpc = On

    with

    magic_quotes_gpc = Off
  5. 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.

Tags: , , ,

3 Responses to “Installing PHP 5.3.0rc2 for XAMPP (Windows)”

  1. d-low Says:

    Thanks for the info, the key line for me was #3 above. I upgraded from PHP 5.1.X to 5.2.9, and until I made that change I was unable to launch Apache successfully. I did NOT have to add the:

    LoadFile "/xampp/php/php5ts.dll"

    line, just the second one got Apache running for me with the new version of PHP. Thanks!

  2. Jorge Says:

    That certainly did it - really helped with the latest 3.5.1 ampache on Windows - thanks!

  3. Beware XAMPP meddling with your Environment Variables! | plasmid.co.uk Says:

    [...] plasmid.co.uk because life is faster in reverse … « Installing PHP 5.3.0rc2 for XAMPP (Windows) [...]

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image