<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A Default Config.php For All Your Projects</title>
	<atom:link href="http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/</link>
	<description>Sometimes, you just go where your feet take you</description>
	<lastBuildDate>Mon, 01 Mar 2010 21:37:00 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: xangelo</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-431</link>
		<dc:creator>xangelo</dc:creator>
		<pubDate>Tue, 10 Nov 2009 15:31:10 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-431</guid>
		<description>Ah, thanks for pointing that out George. I&#039;ve made the appropriate change!</description>
		<content:encoded><![CDATA[<p>Ah, thanks for pointing that out George. I&#8217;ve made the appropriate change!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-430</link>
		<dc:creator>George</dc:creator>
		<pubDate>Tue, 10 Nov 2009 15:22:14 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-430</guid>
		<description>That&#039;s right. I was just warning you about this piece of code:

___
&quot;The error() function also accepts two arguments. The first is the message that you want to be logged. The second is whether or not to force the system to display that particular message. Remember, you can still display a message a not log it. Logging is based on the LOG variable that is defined near the beginning of the file.

-?php
error(&#039;This error message will be logged only!&#039;); 
error(&#039;This error message will be logged AND displayed!&#039;,true);
?-
___

In your example, both would be logged (the constant is set to &#039;true&#039;), AND both would be shown on screen, since the first error() lack the second argument (default &#039;true&#039;), and the second one is &#039;true&#039;, again! :-)

For the first case to be logged only, you should use something like: 

error(&#039;This error message will be logged only!&#039;, false); 

Cheers,
George</description>
		<content:encoded><![CDATA[<p>That&#8217;s right. I was just warning you about this piece of code:</p>
<p>___<br />
&#8220;The error() function also accepts two arguments. The first is the message that you want to be logged. The second is whether or not to force the system to display that particular message. Remember, you can still display a message a not log it. Logging is based on the LOG variable that is defined near the beginning of the file.</p>
<p>-?php<br />
error(&#8216;This error message will be logged only!&#8217;);<br />
error(&#8216;This error message will be logged AND displayed!&#8217;,true);<br />
?-<br />
___</p>
<p>In your example, both would be logged (the constant is set to &#8216;true&#8217;), AND both would be shown on screen, since the first error() lack the second argument (default &#8216;true&#8217;), and the second one is &#8216;true&#8217;, again! <img src='http://wheremy.feethavebeen.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>For the first case to be logged only, you should use something like: </p>
<p>error(&#8216;This error message will be logged only!&#8217;, false); </p>
<p>Cheers,<br />
George</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xangelo</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-429</link>
		<dc:creator>xangelo</dc:creator>
		<pubDate>Tue, 10 Nov 2009 14:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-429</guid>
		<description>Ah, I think I see the issue now. Logging the issue doesn&#039;t display the message automatically. It just writes the error to a log file which can then be checked at a later time. The logfile gives the time and date that the error occurred as well as the error message displayed. The &quot;show&quot; variable is just a way for you to show the message to the user to let them know that something happened. Therefore you can have logging enabled, but pass show as false to just write the error messages to the file, or pass show as true to display the error message in addition to writing it to the file.</description>
		<content:encoded><![CDATA[<p>Ah, I think I see the issue now. Logging the issue doesn&#8217;t display the message automatically. It just writes the error to a log file which can then be checked at a later time. The logfile gives the time and date that the error occurred as well as the error message displayed. The &#8220;show&#8221; variable is just a way for you to show the message to the user to let them know that something happened. Therefore you can have logging enabled, but pass show as false to just write the error messages to the file, or pass show as true to display the error message in addition to writing it to the file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-428</link>
		<dc:creator>George</dc:creator>
		<pubDate>Tue, 10 Nov 2009 11:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-428</guid>
		<description>Exactly. But both cases will display the error message on screen, since the default value for the second argument of error()&#039;s declaration is &#039;true&#039;:

error(&#039;This error message will be logged only!&#039;, false); 
error(&#039;This error message will be logged AND displayed!&#039;[,true]);</description>
		<content:encoded><![CDATA[<p>Exactly. But both cases will display the error message on screen, since the default value for the second argument of error()&#8217;s declaration is &#8216;true&#8217;:</p>
<p>error(&#8216;This error message will be logged only!&#8217;, false);<br />
error(&#8216;This error message will be logged AND displayed!&#8217;[,true]);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xangelo</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-425</link>
		<dc:creator>xangelo</dc:creator>
		<pubDate>Mon, 09 Nov 2009 14:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-425</guid>
		<description>Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xangelo</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-424</link>
		<dc:creator>xangelo</dc:creator>
		<pubDate>Mon, 09 Nov 2009 14:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-424</guid>
		<description>Actually George, because of what that function does, the first block will only write the error to a log file. The second block will decide to display the error on screen.</description>
		<content:encoded><![CDATA[<p>Actually George, because of what that function does, the first block will only write the error to a log file. The second block will decide to display the error on screen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-423</link>
		<dc:creator>George</dc:creator>
		<pubDate>Mon, 09 Nov 2009 12:33:18 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-423</guid>
		<description>Taking this:




As the default value for the segund argument of error() is &quot;true&quot;, both will be shown on screen, unless &quot;false&quot; is used.

Cheers</description>
		<content:encoded><![CDATA[<p>Taking this:</p>
<p>As the default value for the segund argument of error() is &#8220;true&#8221;, both will be shown on screen, unless &#8220;false&#8221; is used.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A1Services</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-422</link>
		<dc:creator>A1Services</dc:creator>
		<pubDate>Mon, 09 Nov 2009 12:00:17 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-422</guid>
		<description>I especially like the way you go about the error handling, good tut</description>
		<content:encoded><![CDATA[<p>I especially like the way you go about the error handling, good tut</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xangelo</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-405</link>
		<dc:creator>xangelo</dc:creator>
		<pubDate>Mon, 02 Nov 2009 21:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-405</guid>
		<description>You&#039;re right Zan, I&#039;ve modified the define(&#039;LOGDIR&#039;,&#039;logs/&#039;) line to define(&#039;LOG_DIR&#039;,&#039;logs/&#039;)</description>
		<content:encoded><![CDATA[<p>You&#8217;re right Zan, I&#8217;ve modified the define(&#8216;LOGDIR&#8217;,'logs/&#8217;) line to define(&#8216;LOG_DIR&#8217;,'logs/&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zan</title>
		<link>http://wheremy.feethavebeen.com/2009/10/a-default-config-php-for-all-your-projects/comment-page-1/#comment-404</link>
		<dc:creator>Zan</dc:creator>
		<pubDate>Mon, 02 Nov 2009 21:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://wheremy.feethavebeen.com/?p=293#comment-404</guid>
		<description>There is just a problem with $file = LOG_DIR.&#039;&#039;.date(&#039;d_m_y&#039;).&#039;.log&#039;; 

It must be LOGDIR not LOG_DIR, ... Or if you define another way :)</description>
		<content:encoded><![CDATA[<p>There is just a problem with $file = LOG_DIR.&#8221;.date(&#8216;d_m_y&#8217;).&#8217;.log&#8217;; </p>
<p>It must be LOGDIR not LOG_DIR, &#8230; Or if you define another way <img src='http://wheremy.feethavebeen.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
