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
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
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