Install PHP

PHP Installation on Windows

  1. Download Apache and PHP Software
  2. Run the Apache installer and install it in
  3. Run the PHP installer and install it in
    • Select Apache 2.2.x Module when prompted
    • For Apache Configuration Directory, use
  4. Re-start Apache in Windows Service: Control Panel -> View by: Small Icons -> Administrative Tools -> Services -> Apache2.2
  5. Add a testing PHP file in c:/eng/soft/apache/apache-2.2/htdocs/hello.php
        <?php echo 'Hello!' ?>
  6. Test the PHP installation with a browser

    If the browser displays the PHP code instead:

    • Apache is not configured with PHP module correctly. (Redo the PHP installation)
    • The PHP code is not embedded with <?php ?>

View & Troubleshoot PHP configuration

To view the system and php configuration as well as PHP pre-defined variables, hit a PHP page with


Configure PHP with Xdebug for PHP Debugging in Windows

  1. Download PHP 5.3 VC6 (32 bit) Windows Binaries from
  2. Copy Xdebug 2.1.2 to

Add to the end of php.ini (Replace my_host_name with your local host name)


Test Xdebug installation

Use php -m to verify Xdebug is installed

cmd> php -m

[Zend Modules]

PHP IDE Tool: Eclipse PHP Installation

  1. Download All-In-One Windows Eclipse PDT from
  2. Create a directory
  3. Extract the eclipse directory in the zip file to the newly created directory
  4. The directory should look like
  5. Rename it to
  6. Run

Install Eclipse Plugin

Eclipse Plugin Name Update Site

Create A Eclipse PHP Project

  1. Click on workbench
  2. In Eclipse, File -> New -> PHP Project
  3. Enter
    • Project name: MyApp
    • Create project from existing source: "C:\eng\dev\apps\myapp\www"

Configure Eclipse's PHP setting

  1. In Eclipse, Windows -> Preferences
  2. PHP -> PHP Servers
    1. New
      • name: MyApp Server
      • URL: http://your_host_name
      • Select Path Mapping
        • Path on server: C:\eng\dev\apps\myapp\www
        • Path in workspace: /myapp
    2. Set the newly created server as default
  3. PHP -> PHP Executables
    1. Add ...
      • Name: XDebug Configuration
      • Executable Path: C:\eng\soft\php\php-5.3\php.exe
      • PHP debugger: XDebug
  4. PHP -> Debug
    • PHP Debugger: XDebug
    • Server: MyApp Server
    • PHP Executable: XDebug Configuration

Make sure no other application is using port 9000 and 10000 in the localhost

Testing PHP Eclipse Installation

  1. Make sure Apache/PHP is running
  2. Right Click in index.php -> Debug As -> PHP Web Page
  3. Enter http://your_host/index.php

Install Memcached (Optional)

  1. Download Windows memcached binary v1.4.4 (Windows 32-bit zip file) from
  2. Unzip it to
  3. In Windows, Start Menu -> Right Click on Command Prompt -> Run as Administrator
  4. Install as service
    Command prompt
    cmd> cd c:\eng\soft\memcached\memcached-win32-1.4.4-14
    cmd> memcached.exe -d install
  5. Go to the control panel -> service and start the newly created service "memcached"

Install Memcached Client

  1. Download from
  2. Extract the DLL file inside the zip file to
  3. Add behind PHP_EXIF DLL configuration