Installing PHP 5.4.0alpha1 into Wampserver
I wanted to do exactly that, and at work we use WampServer so we can easily switch between PHP versions (and it also makes enabling/disabling extensions and options very easy – if you develop on Windows, check it out).
Assuming you have WampServer installed, it is fairly trivial to manually install new versions of the AMP trifecta. Below are the steps to install both PHP 5.4.0alpha1 and Apache 2.2.19-VC9 (which is necessary to run the pre-compiled Windows PHP binaries)
- Download “httpd-2.2.19-win32-x86-ssl.zip” from Apache Lounge
- Download the “VC9 x86 Thread Safe” zip of PHP 5.4.0alpha1 from the Windows PHP QA Site
- Extract both zip files
- Copy the resulting folders into your WampServer bin directory:
Apache should go in \wamp\bin\apache\apache2.2.19-VC9 (or similar – the important bit is that you place it under \bin\apache)
PHP should go into \wamp\bin\php\php5.4.0alpha1-VC9
- Now if you look inside your existing apache folder (\wamp\bin\apache\Apache2.2.17, for example) you should see a file called wampserver.conf. Copy this file into your new apache installation.
- Do the same as step5 for your new PHP installation.
- It’s a good idea at this stage to copy your existing http.conf (and associated conf files – like vhosts for example) from your previous Apache installation into the new one – otherwise Apache may not start since it will be looking at the Apache default install location etc.
- Close WampServer and then start it again; it will read the folders and wampserver.conf files and you should now have the new Apache version and the PHP 5.4.0alpha1 in your WampServer menu!
- Open the Apache submenu, hit version and choose the new Apache version. Do the same for PHP. It may take a f couple of goes to get the new Apache + PHP versions to become “active” as I’ve found WampServer can sometimes silently fail to set a new version.
- Take a look at http://localhost/?phpinfo=1 and you should see that you are running version 5.4