3

I've got a webserver installed with Apache and PHP with mod-security. The problem is that mod-security seems to be incompatible with the PHP installation.

I get the following result in the apache error log when I restart apache:

[Mon May 07 09:28:45.000596 2018] [:notice] [pid 61272] ModSecurity for Apache/2.9.1 (http://www.modsecurity.org/) configured.
[Mon May 07 09:28:45.000691 2018] [:notice] [pid 61272] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
[Mon May 07 09:28:45.000699 2018] [:notice] [pid 61272] ModSecurity: PCRE compiled version="8.39 "; loaded version="8.41 2017-07-05"
[Mon May 07 09:28:45.000705 2018] [:warn] [pid 61272] ModSecurity: Loaded PCRE do not match with compiled!
[Mon May 07 09:28:45.000710 2018] [:notice] [pid 61272] ModSecurity: LUA compiled version="Lua 5.1"
[Mon May 07 09:28:45.000715 2018] [:notice] [pid 61272] ModSecurity: YAJL compiled version="2.1.0"
[Mon May 07 09:28:45.000720 2018] [:notice] [pid 61272] ModSecurity: LIBXML compiled version="2.9.4"
[Mon May 07 09:28:45.000725 2018] [:notice] [pid 61272] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Mon May 07 09:28:46.024997 2018] [mpm_prefork:notice] [pid 61273] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2l configured -- resuming normal operations

As you can see, the error talks about the PCRE version being incompatible with the loaded version. I can't find any information about what this means or how I can fix it. Does anyone has a clue about what to do?

Some server info: Server version: Debian 9.4

PHP info:

PHP 7.2.4-1+0~20180405085422.20+stretch~1.gbpbff9f0 (cli)

Active PHP mods:

bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
Ugluk
  • 41
  • 1
  • 4
  • 1
    We have run into the same issue. It is because we have installed php and apache from ppa.launchpad.net/ondrej/php/ubuntu repository and it comes with libpcre3 Version: 2:8.41-4+ubuntu16.04.1+deb.sury.org+1 I don't now if PCRE 8.41 instead of 8.38 is a struggle for modsecurity, but it seems to work fine. As we can't downgrade PCRE, because of dependencies from PPA repository, we will go with this warning until we realize some real issues with modsecurity – Stephan Oct 27 '18 at 10:00

0 Answers0