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

Maninderpreet Singh
  • 2,569
  • 2
  • 17
  • 31
Meldin Xavier
  • 197
  • 4
  • 14

1 Answers1

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
CubeJockey
  • 2,209
  • 8
  • 24
  • 31
Hassan
  • 96
  • 2
  • 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. – amhokies Jul 11 '16 at 16:31