I created a file called lib/debug2.inc under /tiki and set the permissions for apache.
I added this line to tiki-index.php:
Once that's done, you use this line to print a variable:
debug2_(FILE, LINE, variablename, $variable);
The output is sent to /tiki/debug.out. I ran tail -f debug.out while I was working.
One thing to note., with this loaded, while everything else worked, I could not display tiki-index.php. I would get the error:
"File open failed - global.var.inc"