Installing the PDT
Getting and setting up the PDT is pretty painless. It's not just built on Eclipse. Like Eclipse, it's completely open source. There are no trial periods or licenses to worry about. Just download it and go. There are two ways to download it, depending if you already have Eclipse. If you completed Part 1 of this series, you already have the Eclipse Java EE Edition. We'll first look at installing the PDT on top of Eclipse.
We'll start by installing PDT as a plug-in to Eclipse. Eclipse's plug-in architecture makes this easy. The easiest way to install any Eclipse plug-in is to use its update system. Kick that off by selecting Help > Software Updates > Find and Install, as shown below.
Figure 1. Find and install updates
Now you want to select Search for new features to install, as shown below.
Figure 2. Search for new features to install
Now we need to add the PDT's update site to the list of sites that Eclipse knows about. Do that by clicking New Remote Site.
Figure 3. New remote update site
Now we need to enter the PDT update site's info. For the name of the new remote site, you can pick whatever you want to help you identify the site ("PHP Development Toolkit Updates," for example). The URL is the important field to enter, and the official site is http://download.eclipse.org/tools/pdt/updates, as shown below.
Figure 4. PHP update site information
The new update site should appear in the list of sites and should be selected automatically. Make sure it's the only one selected and click Finish.
Figure 5. Select PHP update site
Eclipse will now ping the update site for a list of updates available to download and install. Select PHP Development Toolkit Updates and click Finish.
Figure 6. Available updates
Now you should see the list of features to install and the license agreement. Accept the terms and click Finish.
Figure 7. Features and license agreement
Now Eclipse will download and install the PDT plug-ins. When it's done, it may ask you to restart Eclipse. After that, you should be able to verify the PDT installation by switching to the PHP Perspective. Select Window > Open Perspective > Other.
Figure 8. Changing perspective
This should bring up a list of available perspectives. Select PHP from the list and click OK.
Figure 9. Select PHP perspective
This should open the PHP perspective. We'll be using that soon, but let's take a quick look at an alternate way to install the PDT.
If you're new to Eclipse, there's an even simpler way to install the PDT. You can download an all-in-one distribution of Eclipse and the PDT. Select and download the PDT All-In-One, then unzip it and launch Eclipse. Once you've launched Eclipse, switch to the PHP perspective by selecting Window > Open Perspective > PHP.
Figure 10. Open PHP perspective
Now we should have PDT installed and ready to use. We need to configure Eclipse PDT.