Tuesday, October 23, 2012

Debugging PHP using NetBeans and x Debug

Objective:

To be able to debug PHP files



Tested on:

- Windows 7 64 bit



Requirements:

- NetBeans 6.9.1 with PHP package
- Apache 2.2
- PHP 5.3
- xDebug 2.1.0 (php-xdebug-2.1.0-5.3-vc9.dll



Steps:

- Install PHP
- Install Apache
- Configure Apache
- Download xDebug
- Configure php.ini
- Install Netbeans
- Create a test project
- Test


- Install PHP

Get the thread safe windows zip package, php-5.3.3-Win32-VC9-x86.zip, from PHP download site http://windows.php.net/download/

unzip the package to c:\php (you can put this in other location but you have to make adjustments)


- Install Apache

Download Apache HTTP server, httpd-2.2.16-win32-x86-openssl-0.9.8o.msi, from http://httpd.apache.org/download.cgi

Start installing Apache by double clicking httpd-2.2.16-win32-x86-openssl-0.9.8o.msi.


- Configure Apache



- Download xDebug
- Configure php.ini
- Install Netbeans
- Create a test project
- Test




Reference:
http://www.xdebug.org/find-binary.php

No comments:

Post a Comment