Eclipse IDE

The Eclipse IDE Integrated Development Environment is open source and provides an excellent environment to develop web applications. This guide provides all necessary steps to setup and get it running, and was modified for installation of the following versions:

  1. XAMPP 5.6.32
  2. Eclipse for PHP Developers, Version Oxygen 1a (4.7.1a)
  3. PHP 5.6.32
  4. MySQL 5.6.32 (MariaDB 10.1.28)

XAMPP

Installation

  • Install XAMPP on a Windows client, or equivalent packages on a Linux client through the packet manager.
  • Install XAMPP Portable on a Windows client, if you want to run it from a portable location.
  • Choose x:\ as installation path, where “x” can be any drive letter available to your system, also a portable one.

Apache

Modify x:\xampp\apache\conf\httpd.conf. The best way to integrate with eclipse is to point the DocumentRoot to your project directory:

DocumentRoot "x:/joomla/htdocs"
<Directory "x:/joomla/htdocs">
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted
</Directory>

Alternatively, you can keep the default DocumentRoot and add an alias to your project directory:

<Directory "x:/joomla/htdocs">
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted
</Directory>
<IfModule alias_module>
  ScriptAlias /cgi-bin/ "x:/xampp/cgi-bin/"
  Alias /joomla "x:/joomla/htdocs/"
</IfModule>

PHP

Modify x:\xampp\php\php.ini:

output_buffering=off
short_open_tag = On
max_execution_time=120
max_input_time=150
memory_limit=256M
error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
upload_max_filesize=128M
date.timezone=Asia/Bangkok
;extension=php_imap.dll
;extension=php_pdo_odbc.dll

MySQL

  1. Create user to connect with in your application. Give him sufficient access privileges.
  2. If you have existing projects, copy the database directories and files to x:/xampp/mysql/data.
  3. Create access for your user for host '%' and 'localhost' (2 entries) with the necessary privileges.
  4. Default options are read from the following files in the given order:
    C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\xampp\mysql\my.ini C:\xampp\mysql\my.cnf C:\xampp\mysql\bin\my.ini C:\xampp\mysql\bin\my.cnf

Eclipse IDE

Java

Eclipse requires Java to run, so install this first.

Eclipse

  • Choose x:\ as installation path, where “x” can be any drive letter available to your system, also a portable one.

XDebug

To activate the debugger, you need to add the following lines to the bottom of x:/xampp/php/php.ini:

[Xdebug]
zend_extension=H:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.trace_output_dir = "H:\xampp\tmp"

Other options can be left at default values. Check the settings have been recognized by checking phpinfo. xampp comes with the correct php_xdebug.dll file already located in x:/xampp/php/ext.

Links

JavaScript

Links

TypeScript

Install the TypeScript IDE for Eclipse.

  1. Install required software: Java 7, Eclipse Kepler 4.3 or higher, Node.js.
  2. In Eclipse go to Help → Install New Software…
  3. Mark the plugin version you would like to install then press Next…
  4. On Install Details press Next…
  5. Review and confirm the plugin to install.
  6. Restart Eclipse.

Settings

  1. Go to Window –> Preferences –> General –> Workspace and modify the Workspace settings:Workspace
  2. Go to Window –> Preferences –> General –> Web browser and set the desired browser for browser output:Web browser
  3. Go to Window –> Preferences –> PHP –> Servers and enter the web server settings:PHP Server
  4. Go to Window –> Preferences –> PHP –> Validation and set the PHP version:Validation
  5. Go to Window –> Preferences –> PHP –> Debug –> Debuggers and check the XDebug settings. They must comply with the settings in the php.ini file:XDebug
  6. Add or Edit Debug Configurations…. If you pointed the DocumentRoot to your workspace, then you can leave the URL on “Auto Generate”, otherwise you must modify the URL as so:Debug Configuration
  7. Window –> Preferences –> PHP –> Code Style –> Formatter. Select “PHP Conventions” as active profile:PHP Formatter
  8. If you have existing projects
    • either select the project directory as workspace when first starting up the new eclipse, or
    • delete the workspace directories and files (filenames start with “.”), then import the project directories with File –> Import –> General –> Existing Projects into Workspace

Links