version=pmwiki-2.2.74 ordered=1 urlencoded=1
author=Petko
charset=UTF-8
csum=fix link
ctime=1156512549
name=PmWiki.DebugVariables
rev=16
targets=Cookbook.Stopwatch,PmWiki.AvailableActions
text=(:Summary:variables useful for debugging:)%0a%0a:$AbortFunction:A custom function name replacing the built-in Abort() function. %0a:$EnableDiag:%0a>>indent%3c%3c%0a(:include AvailableActions#BEGENABLEDIAG#ENDENABLEDIAG:)%0a>>%3c%3c%0a:$EnableIMSCaching:A variable which, when set equal to 1, recognizes the "If-Modified-Since" header coming from browsers and allows browsers to use locally cached pages.  Disabled by default to help the administrator customize its page without needing permanent reloading.%0a%0a:$EnableStopWatch:This activates an internal stopwatch that shows how long it takes to render a page. (If you have a wiki that composes a HTML page from multiple pages, such as a normal layout with a sidebar, you'll get separate timings for each subpage and for the total page.)%0a%0a: :The timings can be displayed by adding [@%3c!--function:StopWatchHTML 1-->@] in the wiki template.%0a%0a: :Valid values are:%0a        $EnableStopWatch = 0; # No timings (the default). No HTML will be generated.%0a        $EnableStopWatch = 1; # Wall-clock timings only.%0a        $EnableStopWatch = 2; # Wall-clock and CPU usage timings. Won't work on Windows.%0a%0a: :See [[(Cookbook:)Stopwatch]] for more details.%0a%0aSee also:%0a* [[AvailableActions#refcount|scripts/refcount.php]] is useful for debugging%0a%0a%0a----%0a>>faq%3c%3c[[#faq]]%0aQ:Is it possible for someone with admin priviledges to always have access to debugging tools, without letting everyone else access them?%0aA:You can easily & automatically allow debugging for anyone with admin priviledges (meanwhile leaving it off for everyone else) by including this line in config.php - ''just be sure that 1) $EnableDiag is either null or set to 0, and 2) to include it near the end of config.php, AFTER declaring your passwords, and after any AuthUser or other priviledge settings'':%0a%0a-->@@if (CondAuth($pagename, 'admin')) $EnableDiag = 1;  # allows admin to always call phpinfo, etc@@%0a%0a>>%3c%3c%0a
time=1430065976
