
Gubed Server Setup

About
Gubed doesent require any special compilation of PHP or any PHP modules to 
be installed, but it does require a directory with some PHP-scripts on the server.


Installation

Simply copy the Gubed subdirectory of the distribution archive to your webroot.
Create a file called 'localsettings.php' in that directory that contains:

<?php
  $gbdDebugServer = "hostname";
  $gbdDebugPort = 8016;
?>

This specifies what hostname and port debugging scripts will try to connect to,
which is either the host/port of your debugger client (wxGubed or Quanta) or
the host port of the proxy, if you need a proxy setup,
This file wont be overwritten by the distribution archive if you upgrade Gubed.


Security

Realize that installing a debugger like Gubed on your webserver comes with a
certain risk; If a malicious user manages to launch a PHP-script that connects
to their own client, pretty much anything can be done as the user running the
PHP-server. (There is currently no known method of changing what computer 
Gubed connects to if you have a localsettigs.php file that explicitly sets the 
hostname and port.)

You might want to protect the gubed directory by only allowing local 
connections or password protect.

Also, the "develop" subdirectory of the Gubed webspace contains scripts that
lets you examine php files on the system, including showing the source code.
If these scripts are available to outsiders, they might get hold of sensitive 
information or proprietary code. If you don't protect your Gubed webspace,
you might want to delete the "develop" subdirectory.


Start debugging

If you have a Gubed client (wxGubed or Quanta) set up, you can now start 
debugging. 
Start the client of your choice and point a webbrowser to the Gubed directory.
You will then see the Gubed welcome page from which you can enter the 
Gubed testbench to try your setup or explore Gubed functions.
You can also click your way on to 'StartSession.php' ('specify script to debug')
to start debugging your own scripts.

When you see the 'StartSession.php' page, it will present to you a form on 
which you can specify what script to debug by entering the path  + file part
of the (local) url of the page.

Note that it's no longer required to include 'Gubed.php' in the scripts you 
wish to debug if you use StartSession.php. StartSession.php is now the
recommended way of starting the scripts when debugging. 
Including 'Gubed.php' manually will still work, however.


Parser testing

On the welcome page is also a link to the Gubed parser testpage. If you click
that link Gubed will scan your system for php files, parse them with it's parser
and see if they compile correctly after the parsing (no files will be changed on
disk).
If you have files that doesent parse correctly, the Gubed developers would
appreciate a copy of the file or code snippet that it fails on.
