Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7987801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:15:13+00:00 2026-06-04T12:15:13+00:00

I’ve spent the day trying to figure out a strange problem. I have a

  • 0

I’ve spent the day trying to figure out a strange problem. I have a WordPress site that is running into the following error:

Warning: preg_replace() [function.preg-replace]: Compilation failed: unknown option bit(s) set at offset -1 in /path/to/public_html/wp-includes/shortcodes.php on line 257

That line in wp-includes/shortcodes.php is as follows:

$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);

I found this article that seemed to match up fairly well with my problem: http://labs.sasslantis.ee/2011/05/errors-in-wordpress-after-php-upgrade/

The article describes a situation in which there is different output of phpinfo(); in apache and on commandline with regard to libpcre

I verified that this is my issue by creating a test file with phpinfo(); in it and also ran the following from the shell:

php -r "phpinfo();"

The script (apache?) version returns PCRE Library Version 6.6 06-Feb-2006
The commandline version returns PCRE Library Version => 8.21 2011-12-12

I’m left wondering what to do. I’m not super well versed in command line usage, so I’m turning to you all hoping for some help.

The article mentions “fixing apache start-flags”. I’m not sure what that means.

I’ve also found a comment somewhere else saying: “OK, it turned out that the problem was an older version of libpcre hanging around on the system and getting loaded by mistake. Once I updated to the latest version of libpcre, problem fixed.” I’m not entirely sure how to vet this information on the server.

==== Edit 1 ====

I’ve have more information:

/opt/pcre/bin/pcretest -C

Returns

PCRE version 8.21 2011-12-12
Compiled with
UTF-8 support
Unicode properties support
No just-in-time compiler support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack

This is not entirely surprising because we already know that the command line returns the correct version. But for some crazy unknown reason PHP, when run via the web, doesn’t return the proper pcre values.

==== Edit 2 ====

I was tipped this article: http://www.bigboylemonade.com/pcre-version-problem-on-cpanel

Running pcretest -C without the full path returns:

PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

I’m going to see what I can do about performing those last steps and will update shortly

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:15:15+00:00Added an answer on June 4, 2026 at 12:15 pm

    Ok guys, I finally got the notes from my host about how they fixed the problem:

    ==================== Begin steps ==============================
    

    when I started on this particular server, this was the data available:

    [root@host2] ~ >> pcretest -C PCRE
    version 6.6 06-Feb-2006
    Compiled with
    UTF-8 support
    Unicode properties support
    Newline character is LF
    Internal link size = 2
    POSIX malloc threshold = 10
    Default match limit = 10000000
    Default recursion depth limit = 10000000
    Match recursion uses stack
    
    [root@host2] ~ >> /opt/pcre/bin/pcretest -C PCRE
    version 8.21 2011-12-12
    Compiled with
    UTF-8 support Unicode properties support
    No just-in-time compiler support
    Newline sequence is LF
    \R matches all Unicode newlines
    Internal link size = 2
    POSIX malloc threshold = 10
    Default match limit = 10000000
    Default recursion depth limit = 10000000
    Match recursion uses stack
    

    Version 6.6 was also showing up in any phpinfo() webpage and also in php -i.
    By default in php versions >= 4.2, the Apache compile flag ‘–with-pcre-regex’
    is automagically included, so any EA run will use the 6.6. version that cPanel
    provides. The key to this was letting the OS know about the pcre libraries we
    want Apache to use, so the first step was to:

    [root@host2] etc >> echo "/opt/pcre/lib/" >> /etc/ld.so.conf
    

    Then running ldconfig — now we have the libraries for both versions of PCRE
    available for the system users:

    [root@host2] etc >> ldconfig -v | grep -i pcre
    /opt/pcre/lib:
    libpcre.so.0 -> libpcre.so.0.0.1
    libpcrecpp.so.0 -> libpcrecpp.so.0.0.0
    libpcreposix.so.0 -> libpcreposix.so.0.0.0
    libpcre.so.0 -> libpcre.so.0.0.1
    libpcre.so.0 -> libpcre.so.0.0.1
    libpcrecpp.so.0 -> libpcrecpp.so.0.0.0
    libpcreposix.so.0 -> libpcreposix.so.0.0.0
    libpcrecpp.so.0 -> libpcrecpp.so.0.0.0
    libpcreposix.so.0 -> libpcreposix.so.0.0.0
    [root@host2] etc >>
    

    Yay! Now, to tell Apache to use those instead of the 6.6 ones, use the handy
    rawopts file and rebuild Apache:

    [root@host2] etc >> echo "--with-pcre-regex=/opt/pcre" >>
    /var/cpanel/easy/apache/rawopts/all_php5 [root@host2.brucesallan.com] etc >>
    /scripts/easyapache --build
    

    When it’s done, test it:

    [root@host2] etc >> php -i | grep -i "pcre library" PCRE
    Library Version => 8.21 2011-12-12 [root@host2.brucesallan.com] etc >>
    
    [root@host2] ~ >> pcretest -C PCRE
    PCRE version 8.21 2011-12-12
    Compiled with
    UTF-8 support
    Unicode properties support
    Newline character is LF
    Internal link size = 2
    POSIX malloc threshold = 10
    Default match limit = 10000000
    Default recursion depth limit = 10000000
    Match recursion uses stack
    
    [root@host2] ~ >> /opt/pcre/bin/pcretest -C PCRE
    PCRE version 8.21 2011-12-12
    Compiled with
    UTF-8 support
    Unicode properties support
    No just-in-time compiler support
    Newline sequence is LF
    \R matches all Unicode newlines
    Internal link size = 2
    POSIX malloc threshold = 10
    Default match limit = 10000000
    Default recursion depth limit = 10000000
    Match recursion uses stack
    
    ========================== End ============================
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.