<?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: How to setup a PHP Error log for WordPress &#8211; Revisited</title>
	<atom:link href="http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/</link>
	<description>I&#039;m in your site, touching your stuff.</description>
	<lastBuildDate>Sun, 01 Aug 2010 00:16:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Rilwis</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-200</link>
		<dc:creator>Rilwis</dc:creator>
		<pubDate>Mon, 08 Mar 2010 09:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-200</guid>
		<description>In my shared host, all the WP errors go to file errors.log without any hack to config.php file. But I think this post is nice for some situation, thank you.</description>
		<content:encoded><![CDATA[<p>In my shared host, all the WP errors go to file errors.log without any hack to config.php file. But I think this post is nice for some situation, thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nacin</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-188</link>
		<dc:creator>Nacin</dc:creator>
		<pubDate>Sat, 20 Feb 2010 19:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-188</guid>
		<description>I also noticed you suggested a core hack. I&#039;d suggest instead forgoing WP_DEBUG all together -- the whole point there is to get E_NOTICEs, which includes WordPress-specific deprecated warnings and debug material.

Instead, just let WordPress set its standard non-debug error_reporting level and do exactly what WordPress would do to turn on a log:
ini_set( &#039;display_errors&#039;, 0 );
ini_set( &#039;log_errors&#039;, 1 );
ini_set( &#039;error_log&#039;, WP_CONTENT_DIR . &#039;/debug.log&#039; );

Hope that helps!</description>
		<content:encoded><![CDATA[<p>I also noticed you suggested a core hack. I&#8217;d suggest instead forgoing WP_DEBUG all together &#8212; the whole point there is to get E_NOTICEs, which includes WordPress-specific deprecated warnings and debug material.</p>
<p>Instead, just let WordPress set its standard non-debug error_reporting level and do exactly what WordPress would do to turn on a log:<br />
ini_set( &#8216;display_errors&#8217;, 0 );<br />
ini_set( &#8216;log_errors&#8217;, 1 );<br />
ini_set( &#8216;error_log&#8217;, WP_CONTENT_DIR . &#8216;/debug.log&#8217; );</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nacin</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-187</link>
		<dc:creator>Nacin</dc:creator>
		<pubDate>Sat, 20 Feb 2010 18:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-187</guid>
		<description>E_DEPRECATED is a PHP constant, new in PHP 5.3, when PHP introduced deprecated warnings. If it exists, we exclude E_DEPRECATED warnings, as WordPress does a few things that is deprecated in 5.3 to ensure PHP 4 compatibility.

(E_STRICT is excluded from E_ALL, but in PHP 6, it is included. Hence why we also include that if PHP 5.3 or greater.)

WP_DEBUG_DISPLAY == false does not hide any errors, it simply doesn&#039;t force them to be displayed (and thus it falls back to the server setting). They are forced on when WP_DEBUG is true.

The inline documentation for this was confusing and in some cases incorrect, so I wrote up new documentation a few days ago.

If you *don&#039;t* want errors displayed, as the example shows, then do this:
define(&#039;WP_DEBUG&#039;, true); // Turn on WP debug mode
define(&#039;WP_DEBUG_DISPLAY&#039;, false); // WP won&#039;t force-display them
define(&#039;WP_DEBUG_LOG&#039;, true); // Log them to wp-content/debug.log
ini_set(&#039;display_errors&#039;, 0 ); // Set the global config display_errors to off.

Hope that all makes sense.</description>
		<content:encoded><![CDATA[<p>E_DEPRECATED is a PHP constant, new in PHP 5.3, when PHP introduced deprecated warnings. If it exists, we exclude E_DEPRECATED warnings, as WordPress does a few things that is deprecated in 5.3 to ensure PHP 4 compatibility.</p>
<p>(E_STRICT is excluded from E_ALL, but in PHP 6, it is included. Hence why we also include that if PHP 5.3 or greater.)</p>
<p>WP_DEBUG_DISPLAY == false does not hide any errors, it simply doesn&#8217;t force them to be displayed (and thus it falls back to the server setting). They are forced on when WP_DEBUG is true.</p>
<p>The inline documentation for this was confusing and in some cases incorrect, so I wrote up new documentation a few days ago.</p>
<p>If you *don&#8217;t* want errors displayed, as the example shows, then do this:<br />
define(&#8216;WP_DEBUG&#8217;, true); // Turn on WP debug mode<br />
define(&#8216;WP_DEBUG_DISPLAY&#8217;, false); // WP won&#8217;t force-display them<br />
define(&#8216;WP_DEBUG_LOG&#8217;, true); // Log them to wp-content/debug.log<br />
ini_set(&#8216;display_errors&#8217;, 0 ); // Set the global config display_errors to off.</p>
<p>Hope that all makes sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil (Frumph)</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-184</link>
		<dc:creator>Phil (Frumph)</dc:creator>
		<pubDate>Wed, 17 Feb 2010 02:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-184</guid>
		<description>Well thats the thing, it does work on my machine, it&#039;s currently creating a debug.log with *only* php errors inside of it.</description>
		<content:encoded><![CDATA[<p>Well thats the thing, it does work on my machine, it&#8217;s currently creating a debug.log with *only* php errors inside of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Spiers</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-182</link>
		<dc:creator>Adam Spiers</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-182</guid>
		<description>Also, WP doesn&#039;t currently let you hide E_DEPRECATED warnings in a clean manner, so I reopened this ticket with a new proposal to solve it:

http://core.trac.wordpress.org/ticket/11987</description>
		<content:encoded><![CDATA[<p>Also, WP doesn&#8217;t currently let you hide E_DEPRECATED warnings in a clean manner, so I reopened this ticket with a new proposal to solve it:</p>
<p><a href="http://core.trac.wordpress.org/ticket/11987" rel="nofollow">http://core.trac.wordpress.org/ticket/11987</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Spiers</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-181</link>
		<dc:creator>Adam Spiers</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:40:21 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-181</guid>
		<description>I know that, but it only works if it&#039;s correctly defined as the value 8192:

http://www.php.net/manual/en/errorfunc.constants.php

It doesn&#039;t work in your case because you redefined E_DEPRECATED to be 1, which is the same value as E_ERROR.  So you are doing a bitwise AND (&amp;) with ~1, which results in hiding all fatal runtime errors, rather than hiding deprecation warnings.  That&#039;s definitely a bad idea!</description>
		<content:encoded><![CDATA[<p>I know that, but it only works if it&#8217;s correctly defined as the value 8192:</p>
<p><a href="http://www.php.net/manual/en/errorfunc.constants.php" rel="nofollow">http://www.php.net/manual/en/errorfunc.constants.php</a></p>
<p>It doesn&#8217;t work in your case because you redefined E_DEPRECATED to be 1, which is the same value as E_ERROR.  So you are doing a bitwise AND (&amp;) with ~1, which results in hiding all fatal runtime errors, rather than hiding deprecation warnings.  That&#8217;s definitely a bad idea!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil (Frumph)</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-180</link>
		<dc:creator>Phil (Frumph)</dc:creator>
		<pubDate>Tue, 16 Feb 2010 11:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-180</guid>
		<description>the ~ before the E_DEPRECATED means to &#039;not include&#039; in the error reporting</description>
		<content:encoded><![CDATA[<p>the ~ before the E_DEPRECATED means to &#8216;not include&#8217; in the error reporting</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Spiers</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-179</link>
		<dc:creator>Adam Spiers</dc:creator>
		<pubDate>Tue, 16 Feb 2010 11:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-179</guid>
		<description>Thanks for the ideas.  I&#039;m not a WordPress expert by any means, but I wonder if this is the best way of doing it.  Any changes to wp-settings.php will get lost during an upgrade, and also defining E_DEPRECATED (or &lt;a href=&quot;http://www.php.net/manual/en/migration53.deprecated.php&quot; rel=&quot;nofollow&quot;&gt;redefining in the case of PHP 5.3 or newer&lt;/a&gt;) to have the same value as E_ERROR (1) is asking for trouble.</description>
		<content:encoded><![CDATA[<p>Thanks for the ideas.  I&#8217;m not a WordPress expert by any means, but I wonder if this is the best way of doing it.  Any changes to wp-settings.php will get lost during an upgrade, and also defining E_DEPRECATED (or <a href="http://www.php.net/manual/en/migration53.deprecated.php" rel="nofollow">redefining in the case of PHP 5.3 or newer</a>) to have the same value as E_ERROR (1) is asking for trouble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uberVU - social comments</title>
		<link>http://frumph.net/wordpress/how-to-setup-a-php-error-log-for-wordpress/comment-page-1/#comment-167</link>
		<dc:creator>uberVU - social comments</dc:creator>
		<pubDate>Sat, 06 Feb 2010 22:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://frumph.net/?p=388#comment-167</guid>
		<description>&lt;strong&gt;Social comments and analytics for this post...&lt;/strong&gt;

This post was mentioned on Twitter by Frumph: How to setup a php error log with #wordpress &amp; #wpmu http://bit.ly/auLWwM...</description>
		<content:encoded><![CDATA[<p><strong>Social comments and analytics for this post&#8230;</strong></p>
<p>This post was mentioned on Twitter by Frumph: How to setup a php error log with #wordpress &amp; #wpmu <a href="http://bit.ly/auLWwM.." rel="nofollow">http://bit.ly/auLWwM..</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
