Pages

Just another bowl of soup

Menu

So, around a week ago PHP 5.4.0alpha1 was released to the QA guys. What does this mean for us? It means we can get a copy of it and tinker around with some of the new features, like traits.

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)

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.