"Call to undefined function Mpdf\mb_regex_encoding()" while mbstring is enabled

1.2k Views Asked by At

I have mbstring enabled in php.ini ("php -m" in CMD shows mbstring in the list), but I'm still getting this error.

Requirements page for mPDF says that it should include mbregex as well. I don't know, maybe it's missing. How can I install it? Or it is not the problem?

My PHP version is 7.4.19.

UPDATE: I'm using MAMP as my local server. phpInfo says current configuration has both mbstring and mbregex.

1

There are 1 best solutions below

0
Finwe On

I have successfully reproduced this behaviour with MAMP.

Everything runs correctly with official windows PHP builds from php.net, so I believe there is an error in MAMP PHP build, even though everything in phpinfo seems OK.

Try submitting a bug report with MAMP.