Viewing blog post - Greg's Tech blog
PHP debugging
| Posted by gmartin on Sat 02 of Dec., 2006 21:19 EST |
I needed to do some debugging of the LDAP authentication with Tikiwiki 1.9.7. I needed a way to see how variables were being set. I found this page on debugging (cache).
I created a file called lib/debug2.inc under /tiki and set the permissions for apache.
I added this line to tiki-index.php:
include ('lib/debug2.inc');
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"
I created a file called lib/debug2.inc under /tiki and set the permissions for apache.
I added this line to tiki-index.php:
include ('lib/debug2.inc');
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"
| Permalink |
|






