NuSphere Corporation
BUY ONLINE
Support Services
Overview
KB
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
Technical FAQ
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla Development
Learn PHP
<Run Debug Session through SSHFailed to connect to the client address message>
Last updated: Mon, 25 May 2009

HOWTO: Install debugger module

In order to install debugger module (server side) please follow steps below:

Please note:
  • PHP Debugger (dbg) is already installed for local debugging with PhpED built-in server.
  • Debugger modules for other platforms are available in debugger\server folder in PhpED install directory
  • If you want to debug with Apache or IIS, either locally or remotely, you can easily setup debugging with the help of dbg_wizard helper script
PREPARE
1. php should be installed and properly set up first (see http://www.php.net/manual/en/installation.php for instructions)
2. create a simple script shown below and run it using your favorite html browser
<?php phpinfo();?>

3. locate path to php.ini listed in phpinfo's topmost header and extension_dir listed in "php core" section
4. make sure extension_dir is not ./. If it is, please set up extension_dir setting in php.ini accordingly. For example "c:/php4/extensions" or "/usr/lib/php4" under unix.

INSTALL
5. install debugger module
5.1. Locate php debugger module for your platform and php version in phped/debugger/server subdirectory, for example debugger/server/Windows for Windows or debugger/server/Linux in case of linux. You will find many dbg-php-x.x.dll for different versions of php starting with php-4.0.6 and some tar balls containing modules for Linux (glibc 2.3 and higher), FreeBSD (4.10 and higher), SunOS and Mac (MacOSX). Please see "Debugging PHP on various platforms" for the table of all supported platforms and the corresponding debugger modules.
5.2. copy selected module into extension_dir directory on the server.
5.3.1 if you do not use any other Zend Extensions and therefore there are no zend_extension or zend_extension_ts lines in php.ini, you may install debugger module as a regular php extension. Just add the following lines (or make sure they already exist) in php.ini:
extension=dbg-php-4.4.so

I assumed that you run your server under Unix. If you run on Windows you'd replace dbg.so with dbg-php.dll. If you run any php version other than 4.4.* (4.4.0 through 4.4.3) please take appropriate module and substitute version number in the module name accordingly.
5.3.2 if you have any zend_extension_ts zend_extension lines in your php.ini you have to load dbg differently. For example:
zend_extension=/var/lib/php4/dbg-php-4.4.so
or
zend_extension_ts=c:\php4\dbg-php-4.4.dll

Note: this line should appear before any other zend_extension(s).
Note: if debugger module is loaded using this way, please make sure extension=dbg.so (or extension=dbg-php.dll) line is removed or commented out.

CONFIGURE
6. Add the following debugger settings to php.ini
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=host1 host2 host3
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16

a) host1 host2 and host3 are host names or IP or network addresses allowed to start debug sessions. If you run debug session though an SSH tunnel, you need to list just one local IP address only (localhost).
b) DBG versions 2.11 (free) does not support debugger.hosts_allow, debugger.hosts_deny or debugger.ports settings.

CHECK
7. Restart web server (SIG_HUP or httpd reload won't help!)
8. Launch phpinfo and check its output. Make sure that one of the topmost headers contains

Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies with DBG v3.4.1, (C) 2000,2008, by Dmitri Dmitrienko


<Run Debug Session through SSHFailed to connect to the client address message>
Last updated: Mon, 25 May 2009