1

Error when using REGEXP in mysql - REG#1139 -

Got error 'this version of PCRE is compiled without UTF support at offset 0'

from regexp in xampp ubuntu, PHP Version 5.6.15 mysqlnd 5.0.11-dev - 20120503

3
  • 1
    Please post some of your code please. Commented Mar 14, 2016 at 11:29
  • Check this link Commented Mar 14, 2016 at 11:29
  • Have a look at this : bbs.archlinux.org/viewtopic.php?id=106313 Commented Mar 15, 2016 at 6:49

1 Answer 1

8

I had the same error after an upgrade from ubuntu 14.04 to 16.04.

I'm using lampp 5.6.20 and had the same error in the requests using REGEXP.

With the below command, I detected this lib doens't have UTF-8 support:

$ /opt/lampp/bin/pcretest -C

...
No UTF-8 support
...

I found that I must recompile my lampp PCRE with these options:

--enable-utf8 --enable-unicode-properties

To do that I downloaded pcre-8.38 and in the extracted folder I executed the next command:

$ ./configure --enable-utf8 --enable-unicode-properties
$ make
$ sudo make install

Then I copied all generated files in the .libs folder to the /opt/lampp/lib folder :

$ sudo cp .libs/* /opt/lampp/lib

Then confirmed support for UTF-8:

$ /opt/lampp/bin/pcretest -C

...
UTF-8 support
...

Lastly I restarted my lampp (to restart mysql or MariaDB) :

$ sudo /opt/lampp/lampp restart
Sign up to request clarification or add additional context in comments.

1 Comment

This worked for me. Only problem I had was that I had to restart lampp twice for some reason. This should be accepted as the right answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.