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:xampphtdocs

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:xamppphp, overwriting the contents of this directory with the new files.
  3. 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"
  4. Replace C:xamppphpphp.ini with C:xamppphpphp.ini-dist
    Uncomment the lines:


    Replace the line

    magic_quotes_gpc = On


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

4 thoughts on “Installing PHP 5.3.0rc2 for XAMPP (Windows)”

  1. 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. That certainly did it – really helped with the latest 3.5.1 ampache on Windows – thanks!

  3. In step 4.. additionally we would need to enable the extension_dir variable to point to the ‘ext’ directory where these extensions are present.
    uncomment the line by removing the semicolon at the start of the line..

    extension_dir = “ext”

    in php.ini.

    In step 5… it would be enough to just copy the dlls. Copying all files from /php to apache/bin may not be needed.

Comments are closed.