<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - HOWTO: Enable DEBUG mode]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/2658/"/>
	<updated>2007-04-02T01:31:45Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/2658/howto-enable-debug-mode/</id>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/91008/#p91008"/>
			<content type="html"><![CDATA[<p>Should we fix for every edition of PunBB?</p>]]></content>
			<author>
				<name><![CDATA[PunBG]]></name>
				<uri>http://punbb.informer.com/forums/user/10017/</uri>
			</author>
			<updated>2007-04-02T01:31:45Z</updated>
			<id>http://punbb.informer.com/forums/post/91008/#p91008</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/88186/#p88186"/>
			<content type="html"><![CDATA[<p>When you run into an error, people can see the query that gives the error.</p>]]></content>
			<author>
				<name><![CDATA[elbekko]]></name>
				<uri>http://punbb.informer.com/forums/user/3935/</uri>
			</author>
			<updated>2007-02-23T19:52:28Z</updated>
			<id>http://punbb.informer.com/forums/post/88186/#p88186</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/88184/#p88184"/>
			<content type="html"><![CDATA[<p>Looks neat to have it on; what&#039;s the downside to showing a few statistics about your server?</p>]]></content>
			<author>
				<name><![CDATA[CReatiVe4w3]]></name>
				<uri>http://punbb.informer.com/forums/user/8742/</uri>
			</author>
			<updated>2007-02-23T19:26:51Z</updated>
			<id>http://punbb.informer.com/forums/post/88184/#p88184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/84160/#p84160"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>af3 wrote:</cite><blockquote><p>anyway / any mod to have this done at admin panel?</p></blockquote></div><p>Thing is, we only really need debug mode when there&#039;s a problem and if it&#039;s enabled via the admin interface and we, for some reason, can&#039;t access the admin interface, we&#039;re screwed.</p>]]></content>
			<author>
				<name><![CDATA[Rickard]]></name>
				<uri>http://punbb.informer.com/forums/user/2/</uri>
			</author>
			<updated>2007-01-03T09:58:51Z</updated>
			<id>http://punbb.informer.com/forums/post/84160/#p84160</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/84146/#p84146"/>
			<content type="html"><![CDATA[<p>Nope: there really isn&#039;t a need to switch it on/off enough to warrant a mod (plus, the mod couldn&#039;t rely on the database to store its information)</p>]]></content>
			<author>
				<name><![CDATA[Smartys]]></name>
				<uri>http://punbb.informer.com/forums/user/1209/</uri>
			</author>
			<updated>2007-01-03T01:45:53Z</updated>
			<id>http://punbb.informer.com/forums/post/84146/#p84146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/84145/#p84145"/>
			<content type="html"><![CDATA[<p>anyway / any mod to have this done at admin panel?</p>]]></content>
			<author>
				<name><![CDATA[af3]]></name>
				<uri>http://punbb.informer.com/forums/user/3912/</uri>
			</author>
			<updated>2007-01-03T01:44:17Z</updated>
			<id>http://punbb.informer.com/forums/post/84145/#p84145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/30480/#p30480"/>
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Because the generation time really isn&#039;t interesting other than when debugging/developing.</p></blockquote></div><p>Oh well, if it amuses some people to show off speed (which I have to agree is not too interesting), then that&#039;s fine.</p>]]></content>
			<author>
				<name><![CDATA[albn]]></name>
				<uri>http://punbb.informer.com/forums/user/1586/</uri>
			</author>
			<updated>2005-01-13T15:12:22Z</updated>
			<id>http://punbb.informer.com/forums/post/30480/#p30480</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26876/#p26876"/>
			<content type="html"><![CDATA[<p>Because the generation time really isn&#039;t interesting other than when debugging/developing.</p>]]></content>
			<author>
				<name><![CDATA[Rickard]]></name>
				<uri>http://punbb.informer.com/forums/user/2/</uri>
			</author>
			<updated>2004-12-08T10:33:27Z</updated>
			<id>http://punbb.informer.com/forums/post/26876/#p26876</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26838/#p26838"/>
			<content type="html"><![CDATA[<p>Why not just MOD the footer to see just the milliseconds info without enabling Pun Debug mode?&nbsp; Would that not solve the safety issue.</p><p>Changes /footer.php in the punbb root (do save a backup first PLEASE!)</p><p>Look for:<br /></p><div class="codebox"><pre><code>// Display debug info (if enabled/defined)
if (defined(&#039;PUN_DEBUG&#039;))
{
    // Calculate script generation time
    list($usec, $sec) = explode(&#039; &#039;, microtime());
    $time_diff = sprintf(&#039;%.3f&#039;, ((float)$usec + (float)$sec) - $pun_start);

    echo &quot;\t\t\t\t\t\t&quot;.&#039;&lt;br&gt;[ &lt;span class=&quot;punclosed&quot;&gt;Generated in &#039;.$time_diff.&#039; seconds, &#039;.$db-&gt;get_num_queries().&#039; queries executed&lt;/span&gt; ]&#039;.&quot;\n&quot;;
}</code></pre></div><p>Change to:<br /></p><div class="codebox"><pre><code>// Display debug info (if enabled/defined)
// if (defined(&#039;PUN_DEBUG&#039;))
// {
    // Calculate script generation time
    list($usec, $sec) = explode(&#039; &#039;, microtime());
    $time_diff = sprintf(&#039;%.3f&#039;, ((float)$usec + (float)$sec) - $pun_start);

    echo &quot;\t\t\t\t\t\t&quot;.&#039;&lt;br&gt;[ &lt;span class=&quot;punclosed&quot;&gt;Generated in &#039;.$time_diff.&#039; seconds, &#039;.$db-&gt;get_num_queries().&#039; queries executed&lt;/span&gt; ]&#039;.&quot;\n&quot;;
// }</code></pre></div><p>In text: I&#039;ve commented out (using &#039;//&#039;) the check for debug mode... if you have your backup, you could also just remove the commented lines in the replacement code.</p>]]></content>
			<author>
				<name><![CDATA[TomTester]]></name>
				<uri>http://punbb.informer.com/forums/user/2332/</uri>
			</author>
			<updated>2004-12-07T22:48:26Z</updated>
			<id>http://punbb.informer.com/forums/post/26838/#p26838</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26119/#p26119"/>
			<content type="html"><![CDATA[<p>Fair enough. Your style is different than mine, that&#039;s ok;)</p>]]></content>
			<author>
				<name><![CDATA[rain]]></name>
				<uri>http://punbb.informer.com/forums/user/2222/</uri>
			</author>
			<updated>2004-11-30T04:57:09Z</updated>
			<id>http://punbb.informer.com/forums/post/26119/#p26119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26037/#p26037"/>
			<content type="html"><![CDATA[<p>rain: The idea is that people generally shouldn&#039;t have it enabled. People think it&#039;s cool to show off how many milliseconds the page was generated in, but they don&#039;t realize debug mode will also reveal things about their server they might not want to disclose in the event of a failure.</p>]]></content>
			<author>
				<name><![CDATA[Rickard]]></name>
				<uri>http://punbb.informer.com/forums/user/2/</uri>
			</author>
			<updated>2004-11-28T17:37:20Z</updated>
			<id>http://punbb.informer.com/forums/post/26037/#p26037</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26035/#p26035"/>
			<content type="html"><![CDATA[<p>but you only enable it when you hit a problem...</p>]]></content>
			<author>
				<name><![CDATA[Connorhd]]></name>
				<uri>http://punbb.informer.com/forums/user/1393/</uri>
			</author>
			<updated>2004-11-28T15:45:02Z</updated>
			<id>http://punbb.informer.com/forums/post/26035/#p26035</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/26032/#p26032"/>
			<content type="html"><![CDATA[<p>Rickard,</p><p>It might be a better idea to suggest adding the line to config.php. For example, I have a local development copy of my PunBB board (because I&#039;m modifying it) and the remote working copy. If PUN_DEBUG is included in common.php then I would (potentially) have to change that file every time I upload a new version to the server.</p>]]></content>
			<author>
				<name><![CDATA[rain]]></name>
				<uri>http://punbb.informer.com/forums/user/2222/</uri>
			</author>
			<updated>2004-11-28T14:51:40Z</updated>
			<id>http://punbb.informer.com/forums/post/26032/#p26032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[HOWTO: Enable DEBUG mode]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/5489/#p5489"/>
			<content type="html"><![CDATA[<p>When DEBUG is enabled, PunBB will display</p><p>- more detailed error messages if/when something goes wrong.<br />- script generation time in the footer.<br />- no. of queries executed in the footer.</p><br /><p>Enable DEBUG by opening up include/common.php, finding (line 26)</p><p>//define(&#039;PUN_DEBUG&#039;, 1);</p><p>And removing the two slashes so that it looks like this:</p><p>define(&#039;PUN_DEBUG&#039;, 1);</p>]]></content>
			<author>
				<name><![CDATA[Rickard]]></name>
				<uri>http://punbb.informer.com/forums/user/2/</uri>
			</author>
			<updated>2003-09-07T13:37:17Z</updated>
			<id>http://punbb.informer.com/forums/post/5489/#p5489</id>
		</entry>
</feed>
