<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Frumph.NET &#187; Error Log</title>
	<atom:link href="http://frumph.net/tag/error-log/feed/" rel="self" type="application/rss+xml" />
	<link>http://frumph.net</link>
	<description>I&#039;m in your site, touching your stuff.</description>
	<lastBuildDate>Wed, 28 Jul 2010 01:20:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to setup a PHP Error log for WordPress &#8211; Revisited</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/</link>
		<comments>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 17:59:54 +0000</pubDate>
		<dc:creator>Phil (Frumph)</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Error Log]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://frumph.net/?p=388</guid>
		<description><![CDATA[There are a few hosts that do not give you an easy ability to see php errors that might happen. The first step is to edit your wp-config.php in your installation root directory. Add these lines: ini_set( 'display_errors', 0 ); ini_set( 'log_errors', 1 ); ini_set( 'error_log’, WP_CONTENT_DIR . '/debug.log' ); Although the use of WP_CONTENT_DIR [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few hosts that do not give you an easy ability to see php errors that might happen.  The first step is to edit your <strong>wp-config.php</strong> in your installation root directory.</p>
<p>Add these lines:</p>
<pre class="brush: php;">
ini_set( 'display_errors', 0 );
ini_set( 'log_errors', 1 );
ini_set( 'error_log’, WP_CONTENT_DIR . '/debug.log' );
</pre>
<p>Although the use of WP_CONTENT_DIR doesn't work for me, I did this instead.</p>
<pre class="brush: php;">
ini_set( 'error_log', dirname(__FILE__) . '/wp-content/debug.log' );
</pre>
<p>Also, since I don't want all those silly notices and warning clogging up my debug.log file, I just want errors only, I do this:</p>
<pre class="brush: php;">
ini_set( 'error_reporting', E_ALL ^ E_NOTICE );
</pre>
<p>This line basically tells the php parser to report all errors, except notices.    If more plugin programmers would test their plugins with the notices on then I wouldnt have 3 pages of notices come up inside the debug.log file.</p>
<p>So in summary:</p>
<pre class="brush: php;">
ini_set( 'display_errors', 0 );
ini_set( 'log_errors', 1 );
ini_set( 'error_log', dirname(__FILE__) . '/wp-content/debug.log' );
ini_set( 'error_reporting', E_ALL ^ E_NOTICE );
</pre>
<p>Based on the comments section, this is a more proper route to go then actually using the defines that were written into the code, dunno why but I take people who know the wordpress core code better then me at their word.   Thanks guys for great comments.</p>
<p>--------<br />
Then if you navigate to your server's wp-content directory there will be a debug.log waiting for you with information in it about what is wrong with your wordpress if an error ever happens.</p>
<p><strong>/wp-content/debug.log</strong></p>
<p>PHP.Net Manual on ini_set: <a href="http://frumph.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L2luaV9zZXQ=">http://www.php.net/ini_set</a></p>
<p>- Phil (Frumph)</p>
 <img src="http://frumph.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=388" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
