Bastian's Blog ~~~~~~~~~~~~~~ :Author: lapis :Date: Tue, 03 Nov 2009 04:46:19 +0100 :Revision: 10 :Copyright: CC by-nc-sa ==================================================== Howto setup a MacBook for PHP development (part 2) ==================================================== :Keywords: software, MacOsX, Apache, webserver, PHP, xDebug, command line interface :Description: :Abstract: The second episode of the little tutorial spends some time of installing and configuring the PHP Extension xDebug. This article is a follow up on the `first part`_ of the 'How to setup an Apache websewrver on a MacBook for PHP development` series. .. _first part: 004_Apache.html Integrating xDebug - easy peasy =============================== Once the Apache was convinced to execute PHP files I wanted enable xDebug_. This beautiful piece of software save me hours of time last year and I don't want to miss it anymore. I found a xDebug binary for PHP 5.2 at the Komodo_ website, which turnes out to be a reliable source of xDebug binaries for every estabished operation system. Just download the needed archive, extract it, and copy the xdebug.so file matching your PHP version to a favorized location in your hard disk. As the standard directory for PHP extensions on Mac Os X is the :: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613 directory. I extracted the archive to my 'tmp' directory and copied the extracted xdebug.so to this directory. .. include:: examples/003_consoleXDebug.example :literal: To configure PHP to use xDebug open the php.ini file and append the following lines: .. include:: examples/003.php_ini.conf :literal: I configured the output file for profiling the '/tmp' dir. If you stick to that be aware that this directory will be cleaned after a restart. You probably want to use another location. This for sure is just a basic setup of xDebug for more information and configuration options see the `xDebug documentation`_. Restarting the Apache will show the xDebug recognition in the phpinfo.php. Next Episode ============ `Next thing`_ is to install the PHP Extension Archive Repository. .. _Next thing: 005_pear.html .. _xDebug: http://xdebug.org .. _xDebug documentation: http://xdebug.org/docs .. _Komodo: http://downloads.activestate.com/Komodo/releases/5.1.3/remotedebugging Trackbacks ========== Comments ========