Tuesday, December 09, 2008

How I got PHP Eclipse running in Ubuntu 8.10 The Intrepid Ibex

First off, PHP Eclipse is awesome. (That's probably why Zend is repackaging it and selling it with all kinds of extra features.) Aside from code coloring, collapsing, and function assistance (which gPHPedit does great at as well), it also does some pretty awesome code completion and custom code tips based on your own code!

Basically if you are working on a project with custom classes, it will intelligently recognize your custom class's methods and variables, and will give tool-tips based on them if you have been adding comment blocks.

So, now that I've made you want PHP Eclipse (and I've already made you want Ubuntu 8.10), let's get to installing!

  1. Open Add/Remove under the "Applications" Menu
  2. Change the "Show" drop down to "All Available Applications"
  3. Type "Sun" in the search box
  4. Check Sun Java 6 Runtime
  5. Click "Apply Changes"
  6. When it finishes downloading and installing, click "Close"
  7. Head over to the Eclipse website and download the latest version of Eclipse.
  8. Extract it to a folder somewhere, then double click the eclipse script. (it should immediately run Eclipse.
  9. Click Help>Software Updates
  10. Click Add Site, and add the PHPEclipse 3.3-3.4 or 3.2 Repository
  11. Check the box next to the new PHP Eclipse Repo and install any available software from it. (Accepting the license agreement, of course)
  12. Close and restart Eclipse.
  13. Open the PHP Eclipse IDE by going to Window>Open Perspective>Other and then selecting "PHP"
  14. That's it!
Troubleshooting:
If you get some obscure message like "An error has occurred. See error log for more details.", that's probably because you are using gcj (an open source Java runtime) or an old version of Eclipse.

My solution to this was to totally uninstall anything gcj related via synaptic, and make sure I was launching the version of Eclipse I downloaded from their site.

If all else fails, you can always purchase and download Zend Studio for Eclipse. It works great and has a few polished finishing touches that makes it worth it for the avid PHP devloper. (I've downloaded it since I purchased it a while back, but I'm going to see how far I get on straght PHP Eclipse)

Rock on, Razzle Dazzle, and enjoy PHP Eclipse!
Link

3 comments:

Ashok Raja R said...

Hi Buddy,

It Really helped me a Lot.

Thanks, Keep Blogging.

ScottJ said...

Thank you very much for this posting. Had the same issue until I followed your instructions.

Using Ubuntu Jaunty and Eclipse Galileo with PHPEclipse 1.2.1.

Keep the posts coming.

Regards,
Scott

Eric Rizzo said...

Instead of trying to completely uninstall gcj, you can just instruct Eclipse to use the Sun JVM directly. See this wiki page for instructions (make sure to pay careful attention to the format information of that file, it is very particular).