title: Apache, Mod_security, and Wordpress, can't remove by rule ID
body: <p>I have been look around trying to get this working right for a while now, and finally bit the bullet and posted here.</p>
  
  <p>I've got a LAMP stack with ModSecurity using the OWASP core rule set (v 2.2.5) and just installed Wordpress. I expected conflicts with ModSecurity, but I haven't been able to ignore or work aroudn the only error I've encountered so far.</p>
  
  <p>The Apache error.log file and the modsec_audit.log both list the same error:</p>
  
  <blockquote>
    <p>ModSecurity: Rule 7f5d9a449228 [id "950901"][file "/etc/modsecurity/owasp-crs/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf"][line "77"] - Execution error - PCRE limits exceeded (-8): (null).`</p>
  </blockquote>
  
  <p>I've tried creating a new .conf file where the crs conf files are located containing </p>
  
  <pre><code>&lt;LocationMatch .*&gt;
    &lt;IfModule mod_security2.c&gt;
      SecRuleRemoveById 950901
    &lt;/IfModule&gt;
  &lt;/LocationMatch&gt;
  </code></pre>
  
  <p>and even removed the <code>IfModule</code> statement and then <code>LocationMatch</code> statement when it didn't work.</p>
  
  <p>Finally I resorted to commenting out lines 76 and 77 in the .conf file, and the error still appeared. This also had no effect.</p>
  
  <p>Only changing <code>SecRuleEngine</code> to <code>Off</code> in <code>modsecurity.conf</code> finally let me access the page. Of course this defeats the purpose of <code>ModSec</code>. </p>
  
  <p>Where am I going wrong?</p>