Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Learn PHP
<Database related Q&ARun debug session>
Last updated: Sat, 13 Jul 2013

HOWTO: Install debugger module

Important notes

  • Debugger module for php is a php extension that should be installed on the same machine where you're running php
  • You need a web server with PHP properly configured. Follow these instructions on how to install php. If you don't have a web server for the development purpose, you can use SRV web server that comes with NuSphere PhpED IDE
  • PHP and PHP debugger (dbg) are already installed for local debugging with SRV web server
  • Debugger modules for all supported platforms are available in the following directory:
  • Debugger modules with SSL-encrypted debugger protocol (safe debugging), are available with NuSphere PhpED PRO commerical version only
  • All web servers (including Apache, NginX and IIS) capable of running PHP, are supported for debugging php. List of supported platforms is available
  • If you want to debug in NuSphere PhpED IDE either locally or remotely, you can quickly setup php debuger using Project Settings Wizard. It will check php and debugger installation, help configuring them, test the results, and suggest what to do in case of problems.
  • It's possible to install debugger module with Project Settings Wizard help or without it

Installing the debugger using Project Settings Wizard (guided installation)

  • Start NuSphere PhpED IDE
  • If you don't have projects, please create one and Wizard will start automatically
  • Open Project -> Project Properties dialog and click [Wizard] button at the bottom
  • Proceed with Project Settings Wizard. It will inspect your php and web server configuration. If debugger is not yet installed, it will suggest how to install debugger, then it will check the debugger functionality.
    NOTE: You will need dbg-wizard.php script on your server. Wizard can upload it for you if project has an associated publishing account.

Installing the debugger without Wizard (manual installation)

  • PHP should be installed and properly configured (see this page for instructions on how to install PHP)
  • Create a simple script shown below and run it using your favorite browser
  • Locate path to php.ini listed in phpinfo's topmost header. This file will be needed in steps 4, 7, and 8 below
  • Make sure extension_dir shown in phpinfo page is not ./ otherwise please set extension_dir to have an absolute path. For example "c:\php5\ext" under Windows or "/usr/lib/php5/modules" under unix.

  • Find php debugger module for the target server platform in %PROGRAMFILES%\NuSphere\PhpED\debugger\server directory, for example C:\Program Files (x86)\NuSphere\PhpED\debugger\server\Windows or C:\Program Files (x86)\NuSphere\PhpED\debugger\server\Linux for Windows and Linux respectively. Debugger modules for all platforms except Windows are packed into tar.gz archive. All archives have directories with supported CPU type as directory name and thread safety indicator _TS appended to its name (if appropriate) at the first level. Debugger module files indicate php version they are compatible with. For example, debugger 5.0.7 module for php 5.3, thread safe, for FreeBSD x86 32bit platform will be found in dbg-5.0.7-FreeBSD.tar.gz archive, x86_TS subdirectory and file name will be dbg-php-5.3.so.
    Please see "Debugging PHP on various platforms" for the table of all supported platforms and the corresponding debugger modules.
  • Copy selected module into extension_dir directory on the server.
  • Pick correct zend_extension_ts vs zend_extension line to load the module and add it to php.ini
    If the OS is Windows and Thread Safety is enabled and php version is 5.2 or below:
    if the OS is Windows and Thread Safety is disabled or php version is 5.3 or above:
    if the OS is UNIX and Thread Safety is disabled or php version is 5.3 or above:
    if the OS is UNIX and Thread Safety is enabled and php version is 5.2 or below:
  • Notes:
    -This line should appear before any other zend_extension(s) unless you're using IonCube. In latter case, debugger should be placed below it.
    -If you run 32bit php (under for example 32bit apache), you have to load 32bit debugger module even though the OS is 64bit.
    -Starting with version 5.3, php does not support zend_extension_ts anymore. With this version, you always have to use only zend_extension.

  • Add the following debugger settings to php.ini
    debugger.hosts_allow=host1 host2 host3
    debugger.ports=7869, 10000/16

    -host1 host2 and host3 are host names or IP addresses of development machines allowed to start debug sessions. If you run debugger through SSH tunnel, you have to add only localhost.
    -7869, 10000/16 means port 7869 and all ports in range from 10000 to 10015 are allowed
    -debugger.hosts_deny=ALL means prohibit all except allowed

  • Restart web server (you have to restart IIS Admin service if you're using IIS)
  • Launch phpinfo and check the output. Make sure that the topmost header contains:
    Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies with DBG v5.0.x, (C) 2000,2013, by Dmitri Dmitrienko
  • If server stopped showing phpinfo page or debugger did not appear on this page, please check these installation troubleshooing
  • It's recommended to check the results using Project Settings Wizard

<Database related Q&ARun debug session>
Last updated: Sat, 13 Jul 2013