Techmania

July 2, 2008

PHP development with Eclipse PDT

Filed under: Development,Linux — mifan @ 9:48 am

In this post, I’ll be outlining the steps to get a fully functional PHP IDE setup. I’ll be using the Ubuntu Linux way of installing stuff, but you can replace it with any repository or online location as needed. First things first, the ingredients: Sun Java 6, Eclipse Europa 3.3, Eclipse PDT. I’m using the latest version of Ubuntu at the time of writing: Ubuntu 8.04 LTS Hardy Heron.

Get the JDK: in Ubuntu, the latest version can be obtained by
apt-get install sun-java6-jdk
which installs the Sun version from the Sun Java website. If you already have GCJ (the GNU JDK), better replace it with this. Installing Java from the Ubuntu repository instead of downloading it manually from Sun means that you don’t have to muck about creating symlinks to Java and the likes – everything’s done for you. Next, install Eclipse. Eclipse is available as a Ubuntu package, but since Hardy Heron contains version 3.2 (not 3.3, which is required for the latest version of PDT) of Eclipse, lets resort to a manual install. What’s more, Eclipse Europa 3.3 bundled with the PHP Development Tools (PDT) can be obtained from the PDT site, so this is what we’ll do. Visit the Eclipse PDT download page. Select the download version you need (1.0.3 in my case), which will take you to the next page. Select the PDT All-in-One package for your platform: Linux, Windows or Mac OS. Download the relevant package and unzip/untar it somewhere. In Linux, I’d do:
tar -xvzf pdt-all-in-one-R20080603-linux-gtk.tar.gz
Which would create the Eclipse directory in the specified location. Go into the Eclipse folder and assign the correct permissions to the executable eclipse file under the Eclipse folder:
chmod 777 eclipse
And then run Eclipse by:
./eclipse
Alternatively, you can add a launcher/shortcut to the panel pointing to this so that Eclipse can be executed with a click of the mouse. Eclipse should be up and running now, with full PDT support. PDT provides error-detection, project builds, and debugging support amongst others.

Eclipse PDT contains many features useful for PHP development, including the much needed PHP debugging support. I’ll touch upon this in my next post. Enjoy Eclipse 🙂

Advertisements

15 Comments »

  1. […] in Eclipse using XDebug Filed under: Development, FOSS, Linux — mifan @ 12:44 pm My previous post touched upon the basics of getting Eclipse PDT (PHP Development Tools) up and running for PHP […]

    Pingback by Debugging PHP in Eclipse using XDebug « Techmania — July 2, 2008 @ 12:44 pm | Reply

  2. Thanks Mifan for this post. Very informative for someone like me who uses gedit for coding PHP. I will give it a try for sure.
    BTW I have added your blog to lkgeeks.org, a Sri Lankan Geek Blog aggregator which I put up few days back..

    Comment by Nazly — July 3, 2008 @ 8:22 am | Reply

  3. Hi,

    Thanks for this. a simple solution

    Comment by Wayne Philip — July 20, 2008 @ 10:46 am | Reply

  4. It’s amazing

    Comment by cauctmailt — August 3, 2008 @ 1:01 am | Reply

  5. Thanks for this!

    However, Eclipse PDT = Eclipse for 32 bit Linux + built-in PHP plugin.
    If you are using Ubuntu for AMD 64, then Eclipse PDT won’t work!

    So if you have Ubuntu for AMD 64, then download & install eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz manually,
    and install the PHP plugin via Eclipse.

    Comment by Peter Martin — August 23, 2008 @ 12:06 am | Reply

  6. Thanks Mifan you saved me a lot of headaches. I tried to install PDT on Debian Etch 4.0 but they only support pre-historic versions of Java 5 and Eclipse 3.1 or something in their repos. I tried to tweak things by force installing Java 6 but Eclipse all-in-one package didn’t want to play so no PDT for Debian. Now I’m resorting to:

    Debian–> Virtualbox–> Ubuntu Hardy 8.04–> Eclipse +PDT

    I got a lot of help from an Eclipse plugin dev on #eclipse troubleshooting my problems on Debian. He showed me that he usually unpacks the all-in-one package in this folder:

    /opt

    When he’s developing on Arch or Gentoo. I wanted to share this for the sake of conformity.
    /opt = Optional application software

    http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#Directory_structure

    Comment by Witch — September 10, 2008 @ 10:04 pm | Reply

  7. thanks. just what i was looking for.

    Comment by Abhisek — September 20, 2008 @ 1:05 am | Reply

  8. Достаточно интересная и познавательная тема

    Comment by Ultimatum — November 18, 2008 @ 8:18 pm | Reply

  9. Thanks mifan. Now I am enjoining with eclips.

    Comment by Ananda — March 31, 2009 @ 4:02 am | Reply

  10. спасибо за статью… добавил в ридер

    Comment by розовый — March 31, 2009 @ 9:29 am | Reply

  11. Спасибо, хорошая статья. Подписался.

    Comment by AdminyAddenue — March 3, 2010 @ 3:17 pm | Reply

  12. Интернет магазин прикольных футболок. Наши прикольные футболки купили более 1 млн. покупателей.
    В каталогах нашего сайта ежедневно появляются новые прикольные майки, который вы сможете купить по самой доступной цене.
    Заказать футболку можно в любую точку России. Чтобы купить футболку, нужно сделать всего пару кликов, оформить заказ и ждать прибытия товара.
    Все футболки проходят предварительный контроль качества, цена футболки формируется от вида нанесения и способа доставки.
    Посетите наш магазин – майки с американским флагом

    Comment by lamclaicaGes — October 22, 2010 @ 3:15 pm | Reply

  13. It is perfect time to make some plans for the future and it is time to be happy. I’ve learn this submit and if I could I wish to counsel you few fascinating things or advice. Perhaps you can write next articles relating to this article. I want to read more things about it!

    Comment by купить футболку — December 28, 2011 @ 9:20 pm | Reply

  14. http://new7652.narod2.ru Продукт «Инфокрафт: ЖКХ. Учет в управляющей компании.

    Comment by deraswuj — April 8, 2012 @ 2:38 am | Reply

  15. PHP development with Eclipse PDT | Techmania – хороший пост, спасибо

    Comment by интернет магазин 777 — May 14, 2014 @ 8:28 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: