Link to home
Start Free TrialLog in
Avatar of cuc888
cuc888

asked on

Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0

i got this error message when running php scripts:

warning: preg_match() [function.preg-match]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 in ...

my server is VPS v3 running on freeBSD. i deinstall and reinstall PCRE but still got the error. i run pcretest - C and it seems to work here:

Compiled with
UTF-8 support
Unicode properties support
Newline sequence is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

any idea why it is not working eventhough PCRE is installed and UTF-8 is supported, please help!!
Avatar of hernst42
hernst42
Flag of Germany image

php has its own pcre lib and that pcre lib is compiled without utf8 support
Avatar of cuc888
cuc888

ASKER

how does it help me? please explain or advice me what to do correcting the problem.
AFAIK it is not possible to use pcre with utf8-strings as regular expressions in php. You can try to recompile php with (from ./configure --help):
Use --with-pcre-regex=DIR to specify DIR where PCRE's include and library files are located,
if not using bundled library.

But don't know if the pcre-function will work proberly with that.
Avatar of cuc888

ASKER

how do i recompile php? where do i place --with-pcre-regex=?
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial