Most web space these days comes with the PHP language, usually running on the Apache webserver, with the MySql database. When developing scripts of one’s own, ideally one replicates this on the PC. But frankly, installing all this stuff is a faff.
This week I came across the Wampserver package. This allows you to install all three items in one go, and has a single menu to start (and stop) the lot. It doesn’t install a load of things that you then have to manually disable, and it just works out of the box fine.
I’ve used Notepad++ for most such scripting, but this is rather underpowered. Instead I have been using lately Eclipse for PHP, the PDP development tools (PDT) version. This likewise works well. If you are a Java developer, with an Eclipse setup, you can relax — it unzips to a different directory, and doesn’t interfere at all. You can run, thus, two different versions of Eclipse quite happily.
For unit testing I’ve been using SimpleTest. You get the software and unzip to a directory on your C: drive. There is an obsolete eclipse plugin for this — which no longer works and ought to be updated. But you can run SimpleTest just fine in eclipse anyway, using the following instructions:
- download and install SimpleTest.
- put a
require_once('autorun.php');at the top of the test file.
note: this requires the SimpleTest directory containing
autorun.phpto be in your
include_path. alternatively, you can include
autorun.phpby full path, like
require_once('C:/full/path/to/your/Simpletest/autorun.php');. it might even be possible not having to change the test file by including
- run the test by right clicking on the test file and select “Run As PHP Script”
- the output from the testing shows up in the eclipse console
Although in my case it doesn’t show up in the console, but as a web page, so long as Wamp has been started.