Author |
|
tanquang
Joined: 21 Mar 2020 Posts: 58 Location: Vietnam
|
Posted: Fri 24 Dec '21 20:50 Post subject: Build with PCRE or PCRE2 or both? |
|
|
PCRE has stopped releasing a new update, the latest version is 8.45, they released PCRE2 instead. While PHP 7 has supported PCRE2 for a long time, Apache 2.4 doesn't seem to have not supported.
The releases on the homepage seem to be using PCRE (I'm not sure)?
So, do you need to switch to Apache compiled with PCRE2 or simultaneously PCRE and PCRE2? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3094 Location: Hilversum, NL, EU
|
Posted: Fri 24 Dec '21 21:18 Post subject: |
|
|
PCRE2 is not supported yet by the 2.4.x branch of Apache HTTPD.
There is a port in trunk (mostly done in http://svn.apache.org/viewvc?view=revision&revision=r1773454 and a few other commits).
The backport for the 2.4.x branch have been stalled since several years because of poor performance with Apache. The reported performance issue is apparently related to the way memory is managed.
With PCRE we can take advantage of the memory pool mechanism used in Apache, but this is no longer the case with PCRE2. In this case, we need to leave the memory management to the OS and use many malloc/free. |
|
Back to top |
|
tanquang
Joined: 21 Mar 2020 Posts: 58 Location: Vietnam
|
Posted: Sat 25 Dec '21 10:32 Post subject: |
|
|
Yes, I'm also wondering this issue. I'm still using PCRE. But from PHP 7.3, it seems to have asked to use PCRE2 (I'm not sure). |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3094 Location: Hilversum, NL, EU
|
Posted: Sun 20 Feb '22 16:25 Post subject: |
|
|
Good news.
The dev’s have started development on PCRE2 again.
Expected soon. |
|
Back to top |
|
tanquang
Joined: 21 Mar 2020 Posts: 58 Location: Vietnam
|
Posted: Mon 21 Feb '22 3:25 Post subject: |
|
|
Hope it will not be as difficult as when building with PCRE. |
|
Back to top |
|
szymek655
Joined: 20 Apr 2022 Posts: 1
|
Posted: Wed 20 Apr '22 15:40 Post subject: |
|
|
I recently stumbled upon a segmentation fault when using a mod_alias RedirectMatch rule. I believe it's a bug in libpcre, but I don't have the necessary C skills to confirm this or to try and attempt finding the root cause and fixing it. I described the problem in this issue: https://bz.apache.org/bugzilla/show_bug.cgi?id=66021 .
In any case I just wanted to mention this to provide another argument against postponing migration to PCRE2 - if any issues/bugs come up in PCRE they won't be fixed since it's no longer supported. |
|
Back to top |
|