The Space For App Developers

Beyond Plain Old HTML Objects

Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex development

with 10 comments

In this tutorial I will explain how to configure a development environment to work with PHP and Flex projects in one tool. In order to do that I will use Eclipse PDT 2.1 (PHP Eclipse plugin), Flash Builder 4 Plug-in Beta 2 and the latest Eclipse IDE for Java EE Developers package, which is eclipse-jee-galileo-SR1-macosx-carbon (of course if you are on Windows you should get the proper Windows version instead) at the moment. Additionally I will use MAMP (Mac, Apache, MySQL, PHP stack), of course there are other possible solutions like WampServer for Windows, multiplatform XAMPP, or Zend Server.

Download links:

- Eclipse IDE for Java EE Developers – http://www.eclipse.org/downloads/

- Eclipse PDT 2.1 (pdt-Update-2.1.2.zip) – http://www.eclipse.org/pdt/downloads/

- Java SE Development Kit (JDK 6 Update 17 – at the moment) – http://java.sun.com/javase/downloads/index.jsp

- Flash Builder 4 Plug-in Beta 2 – https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashbuilder4 (you need to login with a free Adobe ID account)

- ZendDebugger (download latest version depending your operating system) – http://downloads.zend.com/pdt/server-debugger/

- MAMP, WAMP, XAMPP, or Zend Server
http://www.mamp.info/
http://www.wampserver.com/
http://www.apachefriends.org/en/xampp.html
http://www.zend.com/en/products/server-ce/

Installation steps:

Step 1) Start with Eclipse IDE for Java EE Developers installation, it is as simple as unpacking it to some folder on your drive. If you are on Windows make sure you have the JDK (Java Development Kit) installed on your system. Without that Eclipse will not run.

Step 2) Run Eclipse from the folder you installed it in. A clean installation will start with welcome screen; select Workbench option in the right upper corner to go directly to the development environment.

Step 3) Install PDT 2.1 as described in the following section of the PDT installation wiki: http://wiki.eclipse.org/PDT/Installation#Eclipse_3.5_.2F_Galileo_.2F_PDT_2.1

IMPORTANT DON’T INSTALL PDT 2.2 AT THE MOMENT as it has some bugs that are causing PHP scripts to crash. Go to the link  at the top and download one marked on a picture below (pdt-Update.2.1.2.zip):

pdt-download-link
As described in the wiki link above, in Eclipse go to Help > Install New Software… > Add… > Name: PDT, Location: jar:file:/path/to/pdt-Update-2.1.2.zip!/

pdt-Update.zip
Step 4) Install Flash Builder 4 Plug-in Beta 2 pointing to the Eclipse installation that was unpacked earlier, as shown below:eclipse-fb4

Step 5) Now you are ready to run your PHP/Flex development environment. Just remember NOT TO run it with the links provided by the Flash Builder 4 Plug-in installation. IMPORTANT: Directly start Eclipse from the folder you unpacked it into.

You can switch to the PHP or Flash perspective in upper right corner of your Eclipse Workbench by selecting it from the list in the Other option.

swith-perspective

Step 6) Install the Apache, MySQL, PHP stack. Unpack ZendDebugger downloaded from one of the links above. Follow the instructions in README file to install it on your system.

Alternatively you can use ZendExtensionManager and configure it this way in your php.ini file:

zend_extension_manager.debug_server=/Applications/MAMP/bin/php5/zend/lib/ZendDebugger-5.2.15
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always

IMPORTANT: ZendDebugger-5.2.15 is the unzipped ZendDebugger package and its subfolders need to be renamed to follow this schema: php-5.2.x. For example: 5_2_x_comp => php-5.2.x

Just remember to drop dummy.php into your website public root folder on your dev environment.

Step 7) Create your PHP project and give it a Flex Project nature by right clicking on your PHP project and selecting option Add/Change Project Type > Add Flex Project Type. This way you can have all your code in one single project. Of course you can have two separate projects for PHP and Flex but this is your decision. Do what will be more convenient for you.

flex-nature

And now you can Rock & Roll with PHP and Flex!

Written by Piotr Walczyszyn

December 3rd, 2009 at 12:44 pm

Posted in Articles

Tagged with , ,

10 Responses to 'Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex development'

Subscribe to comments with RSS or TrackBack to 'Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex development'.

  1. [...] Na swoim blogu umieściłem tutorial dla osób zainteresowanych konfiguracją środowiska Eclipse PDT wraz z najnowszym wydaniem Flash Builder 4 Plug-in Beta 2. Wszystkich chcących budować aplikacje w oparciu o PHP po stronie serwera oraz technologię Flex po stronie klienta oczywiście zachęcam do lektury: http://www.riaspace.net/2009/12/configuring-eclipse-pdt-and-flash-builder-4-plug-in-for-phpflex-deve… [...]

  2. [...] his blog today Piotr Walczyszyn has posted a tutorial on getting an Eclipse instance set up with the PHP development tools (PDT) and a Flash Builder [...]

  3. Be sure to get the 32 bit carbon version for mac. Plug-in installer says 64-bit cocoa version is not supported

    Michael Prescott

    19 Dec 09 at 2:06 am

  4. thanks. was stuck not knowing how to get it all to work together. this helped.

    kyriakos

    31 Mar 10 at 9:58 am

  5. [...] Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex … [...]

  6. Brilliant,

    Now we can have a full project in one program with easy to access version control.

    Thanx.

    Me

    2 Mar 11 at 4:44 pm

  7. the last taobao agent service yearses

    hermes knockoffs

    25 Feb 13 at 7:02 pm

  8. Great goods from you, man. I’ve understand your stuff previous to and you are just too wonderful. I really like what you have acquired here, certainly like what you are stating and the way in which you say it. You make it enjoyable and you still take care of to keep it sensible. I cant wait to read much more from you. This is actually a great web site.

  9. Thanks for sharing your thoughts on kitchen sinks. Regards

    visit

    5 Mar 13 at 2:13 am

  10. Just want to say your article is as surprising. The clearness to your submit is simply excellent and that i could assume you’re an expert on this subject. Fine along with your permission let me to snatch your feed to keep updated with impending post. Thank you a million and please continue the gratifying work.

Leave a Reply