|Developing with PHP and Eclipse (Helios)|
|Written by Ian Elliot|
|Thursday, 24 June 2010|
Page 1 of 3
With the release of a new version of Eclipse it’s a good time to start using the Eclipse for PHP Developers edition.
This article refers to the 2010 release of Eclipse.
For the more recent version see:
If you have to work with the previous version - Galileo - then an older version of this article is still available at:
I know many of us have struggled with coding PHP the hard way using nothing more than an editor and a development installation of the web site - or even worse, the live production site.
Part of the reason is probably that the task of setting up a full development environment, complete with debugger, for PHP seems to be difficult and all the more so if you have an existing and complex PHP website that you would like to take control of.
In my case the website is a PHP Joomla-based site and this provides me with a lot of code that I have never looked at and little really good documentation to tell me how things work. I've tried working with it with and without Eclipse PHP and all I can say is that the effort in setting Eclipse up was well worth it in terms both of efficiency and in having confidence.
You could say that without Eclipse I was flying blind. With it - I can tackle anything.
So if you have a PHP website or are about to start one - don't hesitate to download the latest Eclipse PHP and do it the logical way.
If you are a beginner to PHP more help can be found in Beginning PHP with Eclipse.
Eclipse doesn't have an installation program - it is as close to copy-and-run as it gets.
You simply download the program, decompress it to a suitable folder and run the main program. You can install multiple copies of Eclipse and run them without worrying about the interactions with the operating system.
You can also use Eclipse PHP in a remote debugging configuration. That is, you can set up a web server with the website installed and then work with the website from a copy of Eclipse installed on another machine. The range of possible configurations of machines, operating systems and web servers is too big to cover them all so I'm going to focus on using a remote server running Linux/Apache/PHP/MySQL and a development system installed on a local client running Windows.
Other configurations follow the same general steps. In my case the remote server is also a virtual machine and the website is Joomla-based (as you can probably guess, it’s the iProgrammer website itself).
I am assuming that the development web server is set up and working and you can browse it as if it was the production website - if any reader thinks that a tutorial on the methods of creating a development site and synchronisation with a production site would make a good topic just email me - Ian.Elliot@i-programmer.info.
If the development website isn't working then don't move on to trying to use Eclipse just yet.
Eclipse is a modular system and while it doesn't need anything by way of installation it certainly does need work when it comes to configuration.
You can spend a lot of time downloading and configuring modules and tracking down missing dependencies. The simplest solution, and the best way to get started, is to download an all-in-one compressed package that is guaranteed to have all the modules. The place to start from is the main Eclipse site:
and you will find all of the downloads at
The one you need for PHP development is, unsurprisingly Eclipse for PHP Developers. It is also often referred to as PHP Development Tools (PDT), but this strictly speaking comprises the modules needed to customise Eclipse to work with PHP.
Once you have the file eclipse-php-helios-win32.zip unzip it into a suitable directory. It doesn't really matter where but \Program Files\Eclipse is a reasonable choice under Windows.
To make running the application easier drag the file eclipse.exe to the toolbar or start menu. You don't have to because you can simply run the file in place but it makes things easier to have a shortcut.<ASIN:3897215187@GE>
|Last Updated ( Monday, 30 January 2012 )|