<?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>David Mudrak&#039;s blog &#187; apache</title>
	<atom:link href="http://blog.mudrak.name/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mudrak.name</link>
	<description>Moodle, Mahara and beer fan</description>
	<lastBuildDate>Fri, 30 Jul 2010 00:54:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Forcing Moodle and any other PHP application to always display errors</title>
		<link>http://blog.mudrak.name/2009/01/forcing-moodle-and-any-other-php-application-to-always-display-errors/</link>
		<comments>http://blog.mudrak.name/2009/01/forcing-moodle-and-any-other-php-application-to-always-display-errors/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 11:36:06 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.mudrak.name/?p=22</guid>
		<description><![CDATA[Again, I ran into situation when a very o{l&#124;d}d installation of Moodle displayed just an empty page instead of a useful error message. That&#8217;s why I again had to play a bit with all these error_reporting and display_error settings. Let me summarise how it works &#8211; at least as far as I know.
There are basically [...]]]></description>
			<content:encoded><![CDATA[<p>Again, I ran into situation when a very o{l|d}d installation of Moodle displayed just an empty page instead of a useful error message. That&#8217;s why I again had to play a bit with all these error_reporting and display_error settings. Let me summarise how it works &#8211; at least as far as I know.</p>
<p>There are basically four places where PHP configuration parameters can be defined: 1) php.ini, 2) httpd.conf 3) .htaccess and 4) source code itself.</p>
<p>The file php.ini contains site-wide PHP configuration. You can define parameters by assigning them a value &#8211; eg display_errors=1</p>
<p>PHP configuration can be defined in Apache configuration as well (either in httpd.conf or a sub-config file included by it). This allows you to redefine defaults from php.ini for a particular directories. You can use statements like php_flag to php_value do it. Or, you can use php_admin_flag or php_admin_value to do the same with the exception that the later form can not be redefined at a lower level again.</p>
<p>If you have &#8220;AllowOverride Options&#8221; defined in Apache for the given location, you can use .htaccess files to redefine PHP settings. The statements php_flag or php_value can be used in .htaccess files. The forms php_admin_* are not supported at this level.</p>
<p>Finally, you can modify some settings by ini_set() or error_reporting() PHP commands. It seems to me that these are at the same level as .htaccess is. I mean &#8211; IMHO there is no way how to disable ini_set() in .htaccess.</p>
<p>What I needed was to disable Moodle code to call error_reporting(0) and ini_set(&#8216;display_errors&#8217;, 0). Therefore I had to go a relevant httpd.conf section and use</p>
<pre>php_admin_flag display_errors on
php_admin_value error_reporting 2147483647</pre>
<p>With this settings, neither .htaccess nor source code itself is able to hide any error message any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mudrak.name/2009/01/forcing-moodle-and-any-other-php-application-to-always-display-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
