logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Build with PCRE or PCRE2 or both?
Author
tanquang



Joined: 21 Mar 2020
Posts: 58
Location: Vietnam

PostPosted: Fri 24 Dec '21 20:50    Post subject: Build with PCRE or PCRE2 or both? Reply with quote

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: 3049
Location: Hilversum, NL, EU

PostPosted: Fri 24 Dec '21 21:18    Post subject: Reply with quote

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

PostPosted: Sat 25 Dec '21 10:32    Post subject: Reply with quote

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: 3049
Location: Hilversum, NL, EU

PostPosted: Sun 20 Feb '22 16:25    Post subject: Reply with quote

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

PostPosted: Mon 21 Feb '22 3:25    Post subject: Reply with quote

Hope it will not be as difficult as when building with PCRE. Sad
Back to top
szymek655



Joined: 20 Apr 2022
Posts: 1

PostPosted: Wed 20 Apr '22 15:40    Post subject: Reply with quote

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


Reply to topic   Topic: Build with PCRE or PCRE2 or both? View previous topic :: View next topic
Post new topic   Forum Index -> Other Software