Topic: PCRE2 Module

I've just installed PHP 7.3 from package 7.3.0~rc1-1.el7.remi. I'm running php-fpm from the same repo. I'm running Wordpress 4.9 and everything is fine except PHPMailer isn't validating email addresses correctly. I traced it down to a PCRE issue. It looks like PHP has loaded the PCRE2 module. Here's the output in phpinfo():

pcre
PCRE (Perl Compatible Regular Expressions) Support    enabled
PCRE Library Version    10.31 2018-02-12
PCRE Unicode Version    10.0.0
PCRE JIT Support    enabled
PCRE JIT Target    x86 64bit (little endian + unaligned)
Directive    Local Value    Master Value
pcre.backtrack_limit    1000000    1000000
pcre.jit    0    0
pcre.recursion_limit    100000    100000

Correct me if I'm wrong about the versions. My issue is that preg_* function calls are failing which is why PHPMailer is failing.

Is the package compiling PHP with PCRE2?

If so, how do you get preg_* functions working? Is there a package with PCRE compiled?

If PCRE2 was not compiled with PHP why is the library version matching the current PCRE2 version?

Re: PCRE2 Module

Yeah..it's PCRE2. I downgraded to 7.2.10 and it's got PCRE 8. It would be interesting to see how to solve this when 7.3 is ready. Is it expected that PCRE2 will be compiled with the stable release? If so, how will preg_* functions be handled?

Re: PCRE2 Module

Indeed, PHP 7.3 now use PCRE2 instead of PCRE, and there is some small changes.
Probably worth to be reported to upstream project (PHPMailer)

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: PCRE2 Module

Notice: PHPMailer 6.0.5 test suites passes with PHP 7.3.0RC1.

So everything seems fine in PHPMailer, or not covered by the test suite.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: PCRE2 Module

More information:

https://wiki.php.net/rfc/pcre2-migration
https://github.com/php/php-src/blob/PHP-7.3/UPGRADING

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: PCRE2 Module

Good to know about PHPMailer 6.0.5. PHPMailer 5.2.26-1.el7 is in epel. Hopefully it will just be a matter of installing a newer version from a different repo. It is important to note that I was able to run WordPress on PHP 7.3rc1 fine. The only piece that was broken was PHPMailer. I'll wait for 7.3 to be stable before I upgrade though. Thanks Remi!