Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /web/mp1/vlcek/martin/include/common.inc.php on line 140

Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /web/mp1/vlcek/martin/include/common.inc.php on line 140

Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /web/mp1/vlcek/martin/include/common.inc.php on line 140

PHP Debugging

Preconditions:

  • Apache installed (Package apache2) and configured

Install the PHP extension dbg:

  • install (sudo apt-get install) php5, php5-dev, autoconf (2.13+), automake (1.4+), libtool (1.3.3+)
  • download dbg sources into a directory and change to this directory, then:
export phpize=/usr/bin/phpize
./deferphpize
sudo make install

  • note the installation directory given by the last command
  • edit /etc/php5/apache2/php.ini:

...
; probably not necessary:
extension_dir = "/the/installation/directory/of/dbg"
...
extension=dbg.so
...
[debugger]
debugger.enabled = true
debugger.profiler_enabled = true
debugger.JIT_host = clienthost
debugger.JIT_port = 7869

Check installation:
  • create file test.php in /var/www:
<? phpinfo(); ?>

  • run it in browser (http://localhost/test.php) and you see something like the following below the first table:
with DBG v2.15.5