<?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>Web's Best Blog &#187; PHP</title>
	<atom:link href="http://www.webs-best-directory.com/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webs-best-directory.com/blog</link>
	<description>Internet Marketing, SEM, News, Sports, Videos, and Politics Blog</description>
	<lastBuildDate>Thu, 11 Jun 2009 22:47:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Warnings Off</title>
		<link>http://www.webs-best-directory.com/blog/2008/12/29/php-warnings-off/</link>
		<comments>http://www.webs-best-directory.com/blog/2008/12/29/php-warnings-off/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 19:04:42 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[This and That]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webs-best-directory.com/blog/?p=323</guid>
		<description><![CDATA[Turning off all PHP warnings.  Depending on your set up, you might be getting a large number of warnings from a PHP script that are written into you Apache log files.  Normally, the correct solution would be to fix the script, and all warnings would be eliminated.  But on certain occasions, this [...]]]></description>
			<content:encoded><![CDATA[<p>Turning off all PHP warnings.  Depending on your set up, you might be getting a large number of warnings from a PHP script that are written into you Apache log files.  Normally, the correct solution would be to fix the script, and all warnings would be eliminated.  But on certain occasions, this isn&#8217;t an option.  </p>
<p><strong>NOTE:</strong> <em>Keep a record</em> of any changes you make to your configuration.  If you turn off php warnings and don&#8217;t remember doing it, you might run into a snag later.  </p>
<p>If you&#8217;re pressed for time and want to stifle all warnings, add this to the top of any file that is included from your main PHP script.</p>
<p><textarea><br />
<?php include error_reporting(0); ?><br />
</textarea></p>
<p>Now, this won&#8217;t just stop the warnings from being printed on the site, but it will also kill all errors being written to your website&#8217;s error_log.</p>
<p>If you want to just suppress warnings on your site, and you have access to your .htaccess file, then make a simple edit.</p>
<p><code><br />
php_value display_errors 0<br />
</code></p>
<p>In order to <strong>add error checking</strong> back to your website:</p>
<p><code><br />
php_value display_errors 1<br />
php_value error_reporting 2047<br />
</code></p>
<p>It&#8217;s totally up to you how you want to handle error checking, but if you have a script that you don&#8217;t plan on changing that is creating error log files of huge sizes, then patching the code as illustrated in example one should do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webs-best-directory.com/blog/2008/12/29/php-warnings-off/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
