Simple clear advice in plain English

Hands on: Debugging PHP on Windows

How to use Eclipse to debug your PHP scripts on Windows

Eclipse
The Eclipse Foundation released a new version, called Ganymede, this summer. The Eclipse download you want is the Eclipse IDE for Java EE developers, which includes web application tools.

Eclipse is almost zero install - just extract the zip archive into a convenient folder and double-click eclipse.exe to test it. You may be prompted to select a JRE, in which case, choose the Sun option.

XAMPP
Setting up a Wamp stack can be a bit fiddly, but thanks to Apache Friends, you can download a complete, ready-to-go environment. One of the advantages of XAMPP is that it has little impact on the rest of your system. There’s an installer, but I prefer the self-extracting archive.

Unpack this to a top-level folder such as c:\xampp. You may end up with a nested folder such as c:\xampp\xampp; in this case, fix it by moving the nested folder to the top level so there’s only one XAMPP folder.

If you have some of the components installed, you lose the tidiness of the XAMPP setup. Ideally, remove them; if you need them for other purposes, you could change the port numbers for conflicting services or use Virtualbox (see further on) for a completely isolated testing environment.

For example, if IIS is running on port 80, ideally stop the service before running XAMPP. Otherwise, open C:\xampp\apache\conf and search for the Listen directive. Change the port to, say, 6080, then search for Servername and change the port to the same number.

Unfortunately, this breaks the Admin button in the XAMPP control panel.
XAMPP is not intended for deployment - only for development - and by default is insecure. This means you shouldn’t run XAMPP on a PC that is publishing services to the internet.

You can secure XAMPP somewhat by going to the security page in the web-based configuration and following the steps there. At a minimum, set a password for MySQL.
If you’ve installed in a top-level folder, running XAMPP is just a matter of double-clicking xamppp-control.exe - from there you can start or stop each component. Only Apache and MySQL are used in this tutorial.

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

screenshot-of-getsimple-cms

Run your own website with GetSimple CMS

An excellent content management system for beginners that doesn't require a database

Choosing a home network server

There are many things to consider when adding a server to a network. Alan Stevens explains

Hands on: SQL injections

Prevent SQL injections with the help of PHP

Question & Answer

Q.Why are some of the keys on my keyboard doing strange...

> Read the answer

Q.Is my phone’s Bluetooth any use?

> Read the answer

Q.Can I switch boot drives so that I can work on older...

> Read the answer

Best deals on the web

img

Samsung RV520-A07

£359.98- Buy it now

img

Acer Aspire 5750G (LX.RXP02.019)

£399.99- Buy it now

img

Apple MacBook Pro (MD313B/A)

£904.37- Buy it now

Latest issue & subscription deals

Poll

Are you concerned about viruses that target mobile phones?

Jargon Buster

Computing terms explained in plain English

Virtual drive

A set of files seen by Windows as a separate hard disk.

Great shopping deals from Computeractive