a2 Meetup Reminder

Events happening in the community are now at Drupal community events on www.drupal.org.
steve.colson's picture
Event type: 
User group meeting

This is just your reminder that the September a2Drupal meeting is this evening!

Alex Fisher will be presenting on using netbeans and xdebug for local Drupal debugging. If you've ever banged your head against your desk in frustration over why something was happening, this night is for you!

Stop on over to Spark Central at 7pm!

(Original post is here: http://groups.drupal.org/node/90544)

Comments

Notes From Presentation

alexfisher's picture

Pre-install Requirements
- Linux, Apache, PHP (e.g. Debian, Centos, Ubuntu Live CD)
- Local installation of Drupal
- PECL, PHP Extension Community Library (e.g. to install on Ubuntu: sudo apt-get install pecl)
- Know locations of:
- PHP Modules Directory (Ubuntu e.g. /usr/lib/PHP5/20060613 )
- PHP Configuration File (Ubuntu e.g. /etc/PHP5/apache2/php.ini, /etc/PHP5/apache2/conf.d/xdebug.ini )

  1. Install XDebug while taking note of paths outputted after install

    Option 1 - Easiest way is via PECL:

    pecl install xdebug

    Option 2 - Alternative is to download, compile, and install using following commands:
    svn co svn://svn.xdebug.org/svn/xdebug/xdebug/trunk xdebug
    cd xdebug
    phpize
    ./configure --enable-xdebug
    make
    make install

  2. Configure PHP for Xdebug

    Ensure xdebug.so is installed in PHP Module Directory.

    Edit PHP Configuration file (either php.ini or xdebug.ini) to include following lines:

    ; Following lines to enable xdebug
    zend_extension=/usr/lib/php5/20060613/xdebug.so ; This should make your Module directory
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_port=9000

    Restart Apache using a command like the following
    sudo apache2ctl restart

    Check to ensure installation is correct by running a simple PHP program from local web server:

    <?php
    phpinfo
    ();
    ?>
  3. Download and install PHP version of Netbeans

    Download at: http://netbeans2.org/downloads/start.html?platform=linux&lang=en&option=php
    Installation instructions at: http://netbeans.org/community/releases/69/install.html

  4. Create a project in Netbeans

    Select File > New Project...
    PHP > PHP Application from Existing Sources
    Sources Folder (E.g. /var/www/demo)
    Project Name (E.g. Demo)
    PHP Version (E.g. PHP 5.2/PHP 5.1)
    Default Encoding (UTF-8)

  5. Have fun debugging.

URLs
Ubuntu http://www.ubuntu.org/desktop/get-ubuntu/download
Xdebug http://www.xdebug.org/docs/install
Netbeans Download http://netbeans2.org/downloads/start.html?platform=linux&lang=en&option=php
Netbeans Install http://netbeans.org/community/releases/69/install.html

Alex Fisher | 734-393-4696
Commercial Progression - The Drupal Experts
http://www.commercialprogression.com

Twitter: @AlexanderFisher
LinkedIn: http://www.linkedin.com/in/alexfisher
Facebook: http://www.facebook.com/alexfisher1

Detroit

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: