Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103611
  • 博文数量: 13
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-17 14:08
个人简介

高级运维工程师 曹青峰 QQ 258896473

文章分类

全部博文(13)

文章存档

2015年(7)

2014年(6)

我的朋友

分类: LINUX

2015-02-04 17:13:12

翻了无数次墙 终于搞定了

nginx: [warn] ModSecurity: Loaded PCRE do not match with compiled!


解决方法

wget


./configure --prefix=/usr/local/pcre-8.36 --libdir=/usr/local/lib/pcre --includedir=/usr/local/include/pcre
     configure有许多参数可配,具体参见./configure --help及手册
4、编译:
     make
5、安装:
     make install
6、检查:
     ls /usr/local 检查是否有pcre目录
     ls /usr/local/lib   检查是否有pcre目录
     ls /usr/local/include   检查是否有pcre目录
7、将库文件导入cache:
     方法1:在/etc/ld.so.conf中加入: /usr/local/lib/pcre,然后运行ldconfig


参考


I believe it's more a bug than a feature.

Cpanel or EasyApache installs PCRE version 8.21 2011-12-12 int /opt/pcre/lib

But it does also install PCRE from YUM repository, which for Centos has Version 7.8 2008-09-05, which is too old.

I am not sure why EasyApache makes Apache and PHP (DSO, mod_ruid2) to use the system ones, even when it's compiled with /opt/pcre parameter.

Requesting PCRE version from command lines reports new version, but using phpinfo() reported old versions. Meaning apache , and PHP running as module uses system ones.

As i have little time nowadays, let's se if another users will encouter same problem, maybe they could provide more information.      

阅读(3522) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~