Digital Base – Blog » linux

Installing Eclipse + Latest Php Development Tools (PDT 2.0)

Posted by Gijs Nelissen in Programming

Following up on my previous post on “installing 3.4 + PDT 2.x” i wanted to let you know there is a much easier way. As we are coming close to a stable version of pdt 2.x (launch on 29th of December) :

  • 2.0 M1 – November 03
  • 2.0 M2 – November 24
  • 2.0 RC1 – December 08
  • 2.0 RC2 – December 14
  • 2.0 RC3 – December 23
  • 2.0 Release – December 29
  • The PDT core team decided to setup an “update site” so you can easily fetch the latest version from within eclipse.

    Installation

    Getting & Running Eclipse

    Get the latest version of Eclipse from the download site. I went for “Eclipse Classic 3.4.1 (151 MB)“. Extract it and double eclipse the eclipse executable.

    Adding the PDT 2.x

    When you selected a workspace and fired up eclipse add the different update sites (Help > Software Updates… > Available Software > Manage Sites)

    A list of the ones you need to add :

    Also make sure to enable the default Ganymede update site.

    make sure these checkboxes are ... checked :)

    make sure these checkboxes are ... checked :)

    Expand the DLTK site and select the Dynamic Languages Toolkit – Core Frameworks or Dynamic Languages Toolkit – Core Frameworks SDK Feature.
    Then check the PDT SDK feature (PDT SDK 2.0.0 ….). Click install & restart eclipse.

    Bug in Eclipse3.4 + PDT 2.0 (all platforms)

    The Problem

    After installing Eclipse 3.4 (codename : Ganymede ) and PDT 2.0 (PHP Development Tools ) as i explained in this post . You should have noticed a strange problem when opening/editing PHP files.

    An internal error occured during “Selection Job Title”

    After googling i found another user having the same problem but no real solution is posted, so here it comes .

    The Solution

    You need to install the latest version of DLTK (Dynamic Languages ToolKit ). Just download the files here , extract those to a local directory. Then launch eclipse, in software installs & updates (help menu) add a local site, and update DLTK.

    After that just restart Ecipse (ganymede) and you can start using PDT.

    Custom .debs for Symfony (1.0/1.1 & 1.2) for Debian/Ubuntu

    Installing multiple versions of symfony

    As i wanted to test some of my projects compability against symfony 1.1, i wanted to install multiple symfony versions on my system. The main reason for this i want to keep the default symfony installation on my desktop as well as on our production environment.Â

    Now as you know, we are working with 5 workstations and multiple servers. So it’s a real pain in the *** doing this stuff all over again on each of those machines, so i decided to create some .debs.

    The Solution

    Thanks to a great guide posted on the Symfony Wiki i was up & running in under 5 minutes. I had to check out the different versions, create some folders to hold the different symfony installs and create some symlinks to make sure you can use those different versions by command line.

    The Packages

    I created 3 different packages for each version of symfony. You can install as many as you like, as those will all use a different path. Direct Link .

    I tested these packages on an Ubuntu Hardy & Feisty and it works like a charm. Let me know if it doesn’t for you.

    If you have a hard time figuring out which version of the symfony framework you want to use for your project, check this post

    Show me the magic

    You can see you now have 3 (or 4) different versions of Symfony available to you.Â

     Multiple Version of Symfony On the same system

    Configuration

    Now the hardest part (if you can even call it that). Howto tell your symfony application which symfony to use ? Just go to your applications config/config.php and update the paths to the corresponding version.

    [code]#52[/code]

    Don’t forget to also update the /js path in your virtual host configuration , change the version to the one you want to use for this project.

    Alias /sf /usr/share/php/symfony_1.0/data/web/sf

    Feedback/Suggestions welcome, just send an email to info@digitalbase.eu Â

    Update : if you have a problem opening PHP files (error occured during Selection Job Title) here is my follow-up post (the fix)

    Installing Eclipse 3.4 + PDT 2.x (nightly build)

    I told you previously about my frustration getting eclipse 3.3 as a default in the latest ubuntu (Hardy Heron 8.04 ). It looks like they are not going to come up with a solution soon.

    This guide will take you through the steps howto get the latest Eclipse together with PDT (PHP development Tools) running on your ubuntu box (Feisty or Hardy). Windows users, this guide will also help you throughout the process of installing our favourite PHP IDE (get that Zend ?).

    Downloading all files :

    get Eclipse 3.4

    Goto the eclipse download site and pick one of the Ganymede (codename for 3.4) packages. As i only need eclipse for PHP development i went for the “Eclipse Classic” package (about 150MB).

    get Eclipse PDT (2.0 nightly build)

    The PDT download page offers alot of different packages. As we are using eclipse 3.4 we will have to go for the 2.x release. Select the “2.0.0 Nightly Build” option and download the package (about 6MB), you don’t need the PDT JUnit Plugin Tests and Automated Testing Framework so just select the first option.

    move the files

    Ok that’s it, now you should have 2 files :

    • eclipse-SDK-3.4-linux-gtk.tar.gz
    • org.eclipse.php_feature-I20080707.zip

    Move those files to your home directory in a folder called “eclipsepdt”.

    Unpacking everything:

    Fire up a terminal window and move to the “eclipsepdt” folder

    cd ~
    cd eclipsepdt

    Now unpack both files

    unzip org.eclipse.php_feature-*.zip
    mv eclipse pdt
    tar -zxvf eclipse-SDK-3.4-linux-gtk.tar.gz

    Now when you ls -all it should something like this :

    Directory listing

    Cleanup : remove archives:

    Once that’s done, you will want to remove the archives (already unpacked).

    rm eclipse*.tar.gz;rm org.eclipse.php*.zip

    This should leave you with a clean folder containing all needed files. You should see something very similar to this :

     listing of eclipse directory (in home)

    Correct Java Installation

    Install Sun’s Java

    Luckily java’s sun is in ubuntu’s package library, so we can use aptitude. If you don’t want Java 6, you can use Java 5 too (sun-java5-jdk. After this command it will ask you to accept a few terms & agreements, and press OK a few times, just follow instructions.

    sudo apt-get install eclipse sun-java6-jdk

    Tell Ubuntu to use Sun’s Java

    This will install the required packages, however, Eclipse will run very
    slowly since (by default) it will be using GNU’s java, not Sun’s. We now need to tell ubuntu to use Sun’s java as the default one (for those using java 5, replace
    java-6-sun with java-1.5.0-sun).

    sudo update-java-alternatives -s java-6-sun

    Next, edit the JVM configuration file

    sudo -b gedit /etc/jvm

    and add the following line ON TOP

    /usr/lib/jvm/java-6-sun

    Tell Eclipse to use Sun’s Java

    If you thought that this was it for the java part you are mistaking. There is a bug where Eclipse totally ignores the default java set in Ubuntu (bug 45347 ). That’s why you need to tell Eclipse explicitly to use the one you just installed.

    sudo -b gedit /etc/eclipse/java_home

    And add

    /usr/lib/jvm/java-6-sun

    On top of that file. Now we’re all set for the java part. Pfew…

    Install PDT

    As we downloaded Eclipse and PDT separately, you need to tell that Eclipse installation to install the PDT project libraries. So launch Eclipse

    ~/eclipsepdt/eclipse/eclipse

    If all goes well you should see something like :

     eclipse ganymede splash

    Feel free to scream if you want to. Press “OK” when eclipse asks you which workspace you want to open (unless you know what you are doing). This is really not important at this point in time, we need to get the PDT functionality running first.

    Now go to Help (alt + H) => “Software Updates” and click the “Add Site” button (right side).

     eclipse add local repositiry

    Now click the “Local” button (again right side) and navigatie to your home directory/eclipsepdt/pdt or just enter “~/eclipsepdt/pdt/” in the Location bar. Then confirm using the OK button (hmm i am making this one really dummy proof).

    If everything goes well you should see something similar to this :

     eclipse software updates screen

    Note the local folder (eclipsepdt/pdt) being on top.

    Now check the PDT feature and click install (guess where ?). Eclipse will now try to locate and include all PDT dependencies (previously you had to resolve those dependencies manually). A few seconds later it should give you an “install” window mentioning “your original request has been modified”.

    You are installing Eclipse PDT

    This basically means that eclipse added the PDT dependencies to your installation queue . If you want to go on (why wouldn’t you if you came this far) just press the Next button. Next page, accept the terms and conditions. (i am letting this one slip from the screenshot gallery) and press Finish.

     PDT installation in progress

    Now it’s time to go for a cup of coffee.

     Woohoo, PDT installed

    That’s it, reload eclipse and enjoy the PDT features.

    Some interesting links :

    If you like this post, just help the community by making your voice count :

    My Frustration : Ubuntu Hardy Heron and Eclipse PDT

    As PHP developers we use ubuntu (now trying Hardy Heron 8.04), but for Eclipse PDT you need Eclipse 3.3 (that is not included in ubuntu repository). Eclipse 3.3 is about 1 year old, and 3.4 will be in testing pretty soon, so for me it's really not clear why Eclipse 3.3 is not the default choice for Ubuntu 8.04.

    So we include Firefox 3b05 by default, but we are using an old version of Eclipse ?

    Please vote for the idea to include 3.3 by default or provide an easy way for users to upgrade.

    More information at launchpad bug #123064

    Asterisk visual voicemail on iphone

    Asterisk Voicemail for iPhone

    Asterisk Voicemail for iPhone allows you to check your voicemail messages on your Asterisk phone system from your iPhone.

    It works similar to the native iPhone Visual Voicemail, allowing you to list messages, listen to messages, display caller-id information, delete and move messages, return calls and change voicemail settings all from your iPhone.

    The technology behind it is Asterisk , PHP for the backend, Smarty and iUI for the frontend. Asterisk is an open source PBX (Private Branch Exchange) that provides all the functionality of high-end business telephone systems, and much more. It is the world's most flexible and extensible telephone system, providing many features that are not yet available in even the most advanced proprietary systems. It is also the world's cheapest telephone system. The software is free and runs on inexpensive Linux servers. Here are a few reasons why you should try Asterisk in your environment:

    1. It is open source!
    2. It has a strong and loyal community that continues to grow. While there are many open source solutions, most don't have nearly the support that Asterisk has.
    3. Its configuration files are so granular you can configure Asterisk to do just about anything and you can easily add third-party applications (weather reports, Bluetooth integration, …).
    4. If a feature doesn't exist, or you need help with something, you can ask the Asterisk community.
    5. Even Linux novices can try Asterisk with a simple bootable ISO image called AsteriskNOW.

    The application and code is available on Google's Code division or you can check out the live demo.

    good linux mkdir usage

    Most people only know mkdir the simple way. The simple way being
    [code]mkdir-simple[/code]
    I will give you some tips howto use mkdir, the “advanced” way.
    All of the above commands could be done in a single command.
    [code]mkdir-advanced[/code]
    It is alot easier to use the -p option with mkdir, and make all subdirectories with a single command. Even after you read this post, you will catch yourself using the ‘cd’ way…
    try to avoid that, it will save you alot of time.

    setup a vpn server (pptp) server under ubuntu

    it’s actually quite easy to setup a pptp vpn server for windows/*nix client on a ubuntu serverÂ

    first off all we install pptpd ( PoPToP Point to Point Tunneling Server)

    [code]install pptpd[/code]

     after that we edit /etc/pptpd.conf

    [code]pptpd.conf[/code]

    then we edit /etc/ppp/options

    [code]options[/code]

    and then we edit /etc/ppp/pptpd-options

    [code]pptpd-options[/code]

    and as last we edit the user file /etc/ppp/chap-secrets

    [code]chap-secrets[/code]

    and finaly we restart the pptpd using the command:

    [code]restart pptpd[/code]

    so you see … it’s not that hard to install a microsoft vpn tunnel server on a ubuntu server Â

    scp sftp support in Krusader (ubuntu gutsy)

    By default the scp/sftp support is not installed when running krusader in a gnome environment). If your 'new net connection' only lists ftp, this is the case for you.

    This means you are missing some kde libraries allowing krusader (or other kde apps) to use the scp/sftp protocol

    [code]gutsy - krusader fix[/code]

    This should do the trick..