脚本宝典收集整理的这篇文章主要介绍了php – ModSecurity最大发布限制(PCRE限制错误),脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
检查完日志后(是的,这不是我做的第一件事 – 叹气)我注意到我从ModSecurity收到了很多错误,例如:
[Mon Aug 12 16:34:45 2013] [error] [client XX.XXX.XXX.XXX] ModSecurity: Failed to access DBM file "/etc/httpd/LOGs//global": PErmission denied [hostname "XXXXXXX.XXX"] [uri "/admin/index.PHP"] [unique_id "UgkAlW1shfcAAHTMK80AAAAF"] [Mon Aug 12 16:34:45 2013] [error] [client XX.XXX.XXX.XXX] ModSecurity: Failed to access DBM file "/etc/httpd/logs//ip": Permission denied [hostname "XXXXXXX.XXX"] [uri "/admin/index.PHP"] [unique_id "UgkAlW1shFcAAHTMK80AAAAF"] [Mon Aug 12 17:11:33 2013] [error] [client XX.XXX.XXX.XXX] ModSecurity: Rule execution error - PCRE limITs exceeded (-8): (null). [hostname "XXXXXXX.XXX"] [uri "/admin/index.PHP"] [unique_id "UgkJNW1shFcAAHXUMHkAAAAH"] [Mon Aug 12 17:11:33 2013] [error] [client XX.XXX.XXX.XXX] ModSecurity: Access denied with code 403 (phase 2). Match of "streq 0" against "TX:MSC_PCRE_LIMITS_EXCEEDED" required. [file "/etc/httpd/conf.d/mod_security.conf"] [line "93"] [msg "ModSecurity internal error flagged: TX:MSC_PCRE_LIMITS_EXCEEDED"] [hostname "XXXXXXX.XXX"] [uri "/admin/index.PHP"] [unique_id "UgkJNW1shFcAAHXUMHkAAAAH"]
我一直在搞乱,谷歌搜索和改变规则几天无济于事.我似乎唯一能做的就是关闭这个虚拟主机的ModSecurity.我正在开发CMS时,这很好,但在生产中,这不是我想要做的事情.有没有人对导致此问题的原因以及如何排序有任何想法?日志似乎指出了与正则表达式限制有关的某些规则,但是由于更改我的帖子接收脚本只是打印出单词test我没有对它们做任何事情(尽管我已经尝试通过SecPcreMatchLimit和SecPcreMatchLimitRecursion来增加限制).似乎我发送的数据量有问题.
我假设SecPcreMatchLimit和SecPcreMatchLimitRecursion与mod_security相关,但您是否尝试在PHP.ini文件中或在PHP执行时间内增加pcre模块的值?
pcre.backtrack_limit和pcre.recursion_limit
您还可以通过以下函数PReg_last_error()确认问题是否与PCRE限制有关
你可以在这里看到更多:http://php.net/manual/en/function.preg-last-error.php
在这里:http://www.php.net/manual/en/pcre.constants.php
我希望这有帮助.
以上是脚本宝典为你收集整理的php – ModSecurity最大发布限制(PCRE限制错误)全部内容,希望文章能够帮你解决php – ModSecurity最大发布限制(PCRE限制错误)所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。