Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex development
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):

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!/

Step 4) Install Flash Builder 4 Plug-in Beta 2 pointing to the Eclipse installation that was unpacked earlier, as shown below:
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.

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.

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

[...] 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... [...]
Konfiguracja środowiska Eclipse PDT z Flash Builder 4 Plug-in dla programistów PHP/Flex – Akademia Pana Flexa
3 Dec 09 at 1:05 pm
[...] 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 [...]
Piotr Walczyszyn’s Blog: Configuring Eclipse PDT & Flash Builder 4 Plug-in for PHP/Flex development | Webs Developer
3 Dec 09 at 9:01 pm
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
thanks. was stuck not knowing how to get it all to work together. this helped.
kyriakos
31 Mar 10 at 9:58 am
[...] Configuring Eclipse PDT and Flash Builder 4 Plug-in for PHP/Flex … [...]
1922 ST GAUDENS $20 NGC MS62 | Coin Talk
21 Jul 10 at 4:39 pm