Check for very old PCRE versions in installer and updater
authorKevin Israel <pleasestand@live.com>
Mon, 16 Dec 2013 16:02:51 +0000 (11:02 -0500)
committerKevin Israel <pleasestand@live.com>
Tue, 21 Jan 2014 22:28:35 +0000 (17:28 -0500)
commitb215d91224f711e263126ae3b8546e022f33ef00
treee4d6af7934b622faedc56f2ca172ea95fa715d5f
parent28a4a17d96e5e2112500a63afb636100bb94a875
Check for very old PCRE versions in installer and updater

RE_IPV6_ADD uses (?(-n)) ("relative reference condition"), and CSSMin uses
\K ("reset start of match"), which only work in PCRE 7.2 and later -- newer
versions than the PCRE 6.6 included with Red Hat Enterprise Linux 5 and its
derivatives (e.g. CentOS 5).

Because the WMF developers, in general, do not seem to support maintaining
compatibility with such old software versions, I have opted to add a check
to the MediaWiki installer for these versions of PCRE. Affected users are
directed to a MediaWiki.org page advising the use of a different PHP package
that uses the bundled PCRE version instead of the older system version.

For now, the minimum PCRE version is set to 7.2, the oldest version not
known to break MediaWiki core. Once PHP 5.3 support is dropped, we may be
able to require PCRE 8.12 (bundled with PHP 5.4.0) or later.

The existing check for mere existence of the PCRE functions is removed;
since PHP 5.3, it is impossible to compile PHP without PCRE support.

Bug: 58213
Change-Id: Icf3732b6f84eeb25990178ae8fe3bd0fe4cc833f
includes/installer/Installer.i18n.php
includes/installer/Installer.php
maintenance/update.php