<?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>Skewed Reality &#187; phpmyadmin</title>
	<atom:link href="http://corfiot.elementality.org/blog/tag/phpmyadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://corfiot.elementality.org/blog</link>
	<description>Just when you thought it all made sense.</description>
	<lastBuildDate>Fri, 06 Jan 2012 12:11:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mod_security and phpmyadmin / wordpress</title>
		<link>http://corfiot.elementality.org/blog/2008/12/06/mod_security-and-phpmyadmin-wordpress/</link>
		<comments>http://corfiot.elementality.org/blog/2008/12/06/mod_security-and-phpmyadmin-wordpress/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 18:26:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[SA]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://corfiot.elementality.org/blog/?p=372</guid>
		<description><![CDATA[There was this problem on my server when I installed phpmyadmin: It would give me &#8220;Method not allowed&#8221; errors when executing SQL or editing from tables. I also had a problem posting in this blog&#8230;. Many instructions online indicate you should use an .htaccess file and add SecRuleEngine Off in it. However, any mod_security directives [...]]]></description>
			<content:encoded><![CDATA[<p>There was this problem on my server when I installed phpmyadmin: It would give me &#8220;Method not allowed&#8221; errors when executing SQL or editing from tables. I also had a problem posting in this blog&#8230;.</p>
<p>Many instructions online indicate you should use an .htaccess file and add SecRuleEngine Off in it. However, any mod_security directives in an .htaccess file produced an &#8220;Internal Server Error&#8221;.</p>
<p>The solution was to give up on the .htaccess and simply add the following to the VHOST configuration (You do have a SEPARATE VHOST for administration of your server, right?):</p>
<p><code>#Allow phpmyadmin to work with mod_security setups<br />
&lt;IfModule mod_security2.c&gt;<br />
&lt;LocationMatch "/tbl_change.php"&gt;<br />
SecRuleRemoveById 950006<br />
&lt;/LocationMatch&gt;</p>
<p>&lt;LocationMatch "/sql.php"&gt;<br />
SecRuleRemoveById 950006<br />
&lt;/LocationMatch&gt;<br />
&lt;/IfModule&gt;</code></p>
<p>This allowed me to keep mod_security configuration intact for all my vhosts (customers), keep the config inside the VHOST I needed and to disable only ONE rule rather than turn them all off.</p>
<p>The &#8220;950006&#8243; part is the rule that fired in my ruleset, which I disable. You can see that from the audit log of mod_security: Just try to delete a row in a table and see the log:</p>
<p><code>--deccca6c-H--<br />
Message: Access denied with code 501 (phase 2). Pattern match ................. ..." at ARGS:sql_query. [id "950006"] [msg "System Command Injection. Matched signature &lt;`.`id&gt;"] [severity "CRITICAL"]<br />
Action: Intercepted (phase 2)<br />
Stopwatch: 1228585827350597 5544 (2039 5155 -)<br />
Producer: ModSecurity v2.1.2 (Apache 2.x)<br />
Server: Apache</code></p>
]]></content:encoded>
			<wfw:commentRss>http://corfiot.elementality.org/blog/2008/12/06/mod_security-and-phpmyadmin-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

