Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-14
7
Medium Priority
?
1,032 Views
Last Modified: 2013-12-13
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!!
0
Comment
Question by:cuc888
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 17939748
php has its own pcre lib and that pcre lib is compiled without utf8 support
0
 

Author Comment

by:cuc888
ID: 17939762
how does it help me? please explain or advice me what to do correcting the problem.
0
 
LVL 48

Expert Comment

by:hernst42
ID: 17939818
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.
0
 

Author Comment

by:cuc888
ID: 17941646
how do i recompile php? where do i place --with-pcre-regex=?
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 1000 total points
ID: 17979838
See http://de3.php.net/manual/en/install.unix.apache2.php if you have an apache running, start with step 10 there.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question