version=pmwiki-2.2.0 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081216 Ubuntu/8.04 (hardy) Firefox/2.0.0.19 author=Petko charset=ISO-8859-1 csum=+anchor [[#faq]] ctime=1156512549 host=81.65.14.164 name=PmWiki.DebugVariables rev=12 targets= text=(:Summary:variables useful for debugging:)%0a%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* 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=1234622645