Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XAMPP - MySql - This version of PCRE is compiled without UTF support at offset 0

I was trying to install a wordpress website on my computer (it's a Mac 10.11) but I got this error:

"This version of PCRE is compled without PCRE support at offset 0 from regexp"

And this problem is connected with this query:

DELETE FROM wp_options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'

I've already searched on Google about it, and even here, but everything I found didn't help me solving this problem. I also tried to reinstall XAMPP but everything it's still the same. And I've got the same problem even if I try to do a query containing a REGEXP from my phpMyAdmin panel.
A lot of solutions talks about recompiling apache or somthing similar, by using the compile command.

Can anybody help me with this problem?
Thanks in advance

like image 419
ilSavo Avatar asked Mar 04 '16 16:03

ilSavo


4 Answers

Faced this problem while setting up a php - mysql project with XAMPP. This worked for me.

Download PCRE from

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

I downloaded ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.zip

(If ftp does not work , use https://sourceforge.net/projects/pcre/files/pcre/8.40/ )

Extract the contents into a folder.

open terminal , cd to the extracted folder.

Run the following

$ ./configure --prefix=/Applications/XAMPP/xamppfiles --enable-utf8 --enable-unicode-properties

$ make

$ sudo make install

And then restart mysql.

Hope this helps.

like image 127
azy777 Avatar answered Nov 06 '22 01:11

azy777


Ubuntu 16.04 LTS

XAMPP 7.1.1. (my XAMPP is located in /opt/lampp)

I had to use these commands to make it work

  1. download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
  2. enter the folder with extracted PCRE and run the following commands
  3. sudo ./configure --prefix=/opt/lampp --enable-utf8 --enable-unicode-properties
  4. sudo make
  5. sudo make install
  6. reboot your pc

Done :)

Based on https://community.apachefriends.org/f/viewtopic.php?f=3&t=75421

like image 21
LubuntuMan Avatar answered Nov 06 '22 01:11

LubuntuMan


I didn't read title fully at the first which unlike content has correct error format

I doubt if thrown error is copy/pasted correctly. If I correct that error in this way:

  • compled => compiled
  • without PCRE support => without UTF support

then I can say it's code error #32 of PCRE compilation errors:

32 this version of PCRE is compiled without UTF support

Now with knowing the correct type of error you should test and see if your PCRE is compiled with UTF or not (which is not probably), by running:

pcretest -C

in your command line. In my case output is like below:

PCRE version 7.0 18-Dec-2006
Compiled with
  UTF-8 support
  Unicode properties support
  Newline sequence is ANY
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

and in your case it should differ. If you don't see UTF-8 support in output then your installation of XAMPP didn't came with PCRE UTF-8-compile flag set and you should install a version of XAMPP which does support it.

like image 1
revo Avatar answered Nov 06 '22 02:11

revo


I had this same problem and the general advice was to install AMPPS instead of XAMPP. You can have both installed at the same time, although you can only run one at a time (out of the box).

Watch Ditch MAMP and XAMPP and get AMPPS to see an installation of AMPPS and see how easy it is to get up and running with a virtual host for your wordpress project.

I'm using AMPPS now and my this version of PCRE is compiled without UTF support at offset 0 problem has disappeared.

like image 1
David Newcomb Avatar answered Nov 06 '22 02:11

David Newcomb