Dokuwiki - A PCRE internal error occured. This might be caused by a faulty plugin

By xngo on August 6, 2019

Symptom

After upgrading from Debian Stretch to Buster, opening some Dokuwiki pages show the following error message:

A PCRE internal error occured. This might be caused by a faulty plugin

These pages were working correctly on Debian Stretch. I didn't change anything.

Solution

After looking into /var/log/apache2/error.log, I narrowed down to the error message:

preg_match(): Compilation failed: invalid range in character class at offset 3552 in /.../inc/parser/lexer.php on line 118

Further research using google, I found this github issue about the lexer.php that is not compatible with PHP 7.3. I was indeed using Frusterick Manners version of Dokuwiki.

To resolve this issue, I upgraded my Dokuwiki version to Greebo. However, at the same time, I also need to upgrade my plugins to the latest version. Otherwise, it is showing a lot of errors. So, before upgrading to Greebo, make sure that your plugins work with that version.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.