Create an Open Source Development Environment
Submitted by elmer on Mon, 03/20/2006 - 4:36pm.
This document is based on PHPeclipse installation for Eclipse 3.x. I updated to account for changed install habits of some of the packages.
Create a folder somewhere that's easy to remember and download the following files and archives to it:
You will need all of these to complete this install.
- Install Java 2 Standard Edition
- Using the 'Offline Install' is the best idea.
- Accept all of the defaults for the install.
- Install XAMPP
- XAMPP is a complete installation of Apache, MySQL, PHP and more.
- Use the Windows installer build as it is the smallest and the easiest to install.
- Accept the default install location of 'C:\Program Files' which will create a XAMPP folder and put everything in it.
- I would recommend not running Apache and MySQL as services. It is more efficient to just start them when you need them.
- Add the following alias to the apache configuration in file c:\program files\xampp\apache\conf\httpd.conf:
Alias /workspace "C:/Program Files/xampp/eclipse/workspace"
<Directory "C:/Program Files/xampp/eclipse/workspace">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
- Install Eclipse
- Eclipse is an IDE that was originally developed for use with Java programming. Through its plugin API it can be used to develop PHP applications.
- Extract the Eclipse ZIP into C:\Program Files\xampp\
- You can find the Eclipse documentation here.
- Install PHPeclipse
- Extract the PHPeclipse file into C:\Program Files\xampp\eclipse
- Note: the /plugins and /features directories in the *.zip file should be in sync with the eclipse /plugins and /features directories)
- Note: Eclipse 3.x caches all plugin.xml files into a single repository for quicker loading. If you used eclipse before installing PHPeclipse, you should start eclipse once with the -clean option. This -clean forces Eclipse to rebuild that repository. This applies to anything that is installed into eclipse by unzipping it into its plugins folder.
- See these Install Notes
- Install the Quantum Database Utility
- Extract the Quantum Db file into C:\Program Files\xampp\eclipse
- Note: the /plugins and /features directories in the *.zip file should be in sync with the eclipse /plugins and /features directories)
- Install the dbg debugger
- Download either the PHP 4.3 or 5 modules depending on which version of PHP you plan on using with XAMPP. XAMPP includes both versions of PHP and the ability to switch between them. I suggest just using PHP 5 at this point.
- Open the debugger zip archive and extract php_dbg.dll-xxx according to the version appropriate for your system and PHP version to C:\Program Files\xampp\php\ext and rename to php_dbg.dll.
- Additional information about the debugger can be found here: DbgBasedDebugger
- Edit C:\Program Files\xampp\apache\bin\php.ini as follows to enable the debugging functions. Note that this is the working PHP initialization file. If you use XAMPP to switch versions of PHP, you will need to reset the debugger settings.
;Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
implicit_flush = On
; add the dbg extension
extension=php_dbg.dll
; Add this section at the end of php.ini:
[debugger]
debugger.enabled = true
debugger.profiler_enabled = true
debugger.JIT_host = clienthost
debugger.JIT_port = 7869
- Install the SQL Plugin
- Open the MySQL Java connector archive and extract mysql-connector-java-x.x.x.jar to C:\Program Files\xampp\mysql\
- Install WinHelp
- Copy php_manual_en.chm to C:\Program Files\xampp\php
Let's try it all out!
- Launch the XAMPP Control Panel
- Test your XAMPP install by opening http://localhost/ in a browser
- Surf on through to PHPMyAdmin to verify that MySQL is working properly
- Take the opportunity to give MySQL a password
- Launch Eclipse from C:\Program Files\xampp\eclipse\eclipse.exe
- Set your workspace to C:\Program Files\xampp\eclipse\workspace (creating the folder if need be)
- Open the PHP perspective by selecting Window, Open Perspective, and Other from the menu and selecting PHP from the list.
- Add a MySQL database perspective by selecting Window, Open Perspective, and Other from the menu and selecting Quantum DB from the list.
- Right click in the Database Bookmarks pane to open the New Bookmark dialog.
- Add the MySQL driver by clicking on Add driver and then Add external jar to locate the MySQL driver at C:\Program Files\xampp\mysql\.
- Click Browse to open the Select a Driver dialog and select com.mysql.jdbc.Driver and click OK.
- Make sure Type is MySQL and click Finish
- Back in New Bookmark highlight the MySQL driver and click Next.
- Enter Userid, Password, and Database name as appropriate and click Next.
- Name the bookmark and click Finish
7258 reads
|