The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Case 58625] PCRE problems

Discussion in 'EasyApache' started by simonas, May 20, 2013.

  1. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    Hi,

    Centos 6 x64 server, updates, WHM 11.38.0 (build 7)

    After installing Apache 2.4.4 and PHP 5.4.14 -PCRE issues:

    System has:

    PHP uses:

    All installed:

    Users are having a lot of problems due to the old PCRE version being used, like:
    preg_replace(): Compilation failed: unknown option bit(s) set at offset 0
    preg_split(): Compilation failed: unknown option bit(s) set at offset 0

    That means popular software, like SMF , Wordpress will not work correctly.

    How this could be fixed. How to tell PHP use Cpanel's PCRE version?

    Thanks
     
  2. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    Anybody? I found about 10 similar threads on this forum with no answers.
    More and more people will encounter same issue.

    Thanks
     
  3. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    No help from support:

    Fixed it myself:

    And rebuild EasyApache.

    I did more, cleaned, tested, investigated, but the above should do the trick.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to hear you were able to find a manual workaround. It's still a good idea to submit a feature request for a newer version at:

    Submit A Feature Request

    Thank you.
     
  5. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    Hey, Michael,

    I believe it's more a bug than a feature.

    Cpanel or EasyApache installs PCRE version 8.21 2011-12-12 int /opt/pcre/lib

    But it does also install PCRE from YUM repository, which for Centos has Version 7.8 2008-09-05, which is too old.

    I am not sure why EasyApache makes Apache and PHP (DSO, mod_ruid2) to use the system ones, even when it's compiled with /opt/pcre parameter.

    Requesting PCRE version from command lines reports new version, but using phpinfo() reported old versions. Meaning apache , and PHP running as module uses system ones.

    As i have little time nowadays, let's se if another users will encouter same problem, maybe they could provide more information.
     
  6. epaslv

    epaslv Member

    Joined:
    May 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    When you update apache to Apache 2.4.4 and build via PHP (DSO, mod_ruid2) it uses system version of pcre and not the one compiled --with-pcre-regex=/opt/pcre

    pcretest -C PCRE
    /opt/pcre/bin/pcretest -C PCRE

    I happens on all of our servers, It would be nice to acknowledge this as a problem.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you submit a bug report for this issue so we can investigate this issue and open an internal case with our developers if necessary? You can submit a bug report via:

    Submit A Bug Report

    Please provide us with the ticket number you are assigned so we can keep this thread updated.

    Thank you.
     
  8. epaslv

    epaslv Member

    Joined:
    May 18, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Request id is: 4165457

    Interesting observation, when PHP 5 Handler is switched to "cgi" all appears ok.

    Switch it to "dso" and you get errors as per below

    preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unknown option bit(s) set at offset -1
    preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: unknown option bit(s) set at offset -1
     
  9. dmacleo

    dmacleo Active Member

    Joined:
    Jan 28, 2012
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    just caught this today myself with a 48hr old cent 6.4 and cpanel install after swapping to mod_ruid.
    trying the fix above today, swapping to fcgid does work though.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The issue was resolved on this particular ticket with the use of the following command:

    Code:
    # ldconfig
    This updated the library cache after the custom changes that were made to /etc/ld.so.conf from the manual workaround previously attempted by the user. After running this command, another instance of EasyApache completed successfully and no further issues were detected after that.

    Thank you.
     
  11. dmacleo

    dmacleo Active Member

    Joined:
    Jan 28, 2012
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I will try that, thanks
     
  12. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    As of WHM 11.38.2 (build 3) with Easy::Apache v3.22.6 the problem still exists.

    Developers, please fix this issue, so that mod_ruid2 would use PCRE from /opt/pcre, not the outdated YUM ones.

    EDIT: also MOD SECURITY reports this:

    Meanwhile users can fix this manually.
    Recommended to do this on new server before compiling EasyApache (as you'll need to recompile after fix).

    Run this:
    Code:
    echo "/opt/pcre/lib/" >> /etc/ld.so.conf 
    ldconfig
    

    And (re)compile EasyApache.

    After this check which version of PCRE php uses. It should be:
    PCRE Library Version 8.21 2011-12-12
     
    #12 simonas, Aug 26, 2013
    Last edited: Aug 26, 2013
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Our developers are aware of this issue, and an internal case is open to address it. For reference, the internal case number is 58625. Our development team is still researching the issue at this time, so there is currently no specific time frame available on when a resolution may be implemented.

    I have made a note to update this thread with more information as it becomes available.

    Thank you.
     
  14. kubekarre

    kubekarre Registered

    Joined:
    Jan 21, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello guys, any update on this ? I have used the custom fix above, but any idea when a fix will be implemented in easy apache?
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's an active case that our EasyApache team is aware of. There is no specific time frame available on when a resolution will be implemented into EasyApache as this time.

    Thank you.
     
  16. yatesf

    yatesf Member

    Joined:
    Sep 28, 2013
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I've been repeatedly getting these same errors in the apache error log. I have not officially reported/documented it in a cPanel ticket though. Count me in though, as a person who also wishes to have this bug fixed in future versions.

    I implemented the above fix for a temporary solution, but instead of (re)compiling EasyApache, I was able to just run the following two commands instead for successful error resolution:
    Code:
    /scripts/rebuildhttpdconf
    service httpd restart
     
  17. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    Well let's hope after a major 11.40 update they will have more time fixing smaller bugs.
     
  18. ScottTh

    ScottTh Well-Known Member

    Joined:
    Jan 28, 2013
    Messages:
    157
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi simonas,

    This case is on the EasyApache team's to-do list. We're working hard on a multitude of new features and fixes at the moment. We hope to have this fix available to everyone in the near future.

    Thank you!
     
  19. tandyuk

    tandyuk Active Member

    Joined:
    Dec 18, 2003
    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    8


    I just hit this issue on a brand new centos 6.4 VPS.
    May I suggest it gets moved MUCH higher up the easyapache teams TODO list,
    Like AT THE DAMN TOP!

    I couldn't give a crap about new features while the existing features don't work properly.

    I look forward to this simple fix being included in easyapache within the next few DAYS!
     
  20. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider
    I wouldn't hold your breath waiting on cPanel to fix this quickly. It will likely be months if not end of 2014 before it is resolved.
     
Loading...
Similar Threads - [Case 58625] PCRE
  1. guldvog
    Replies:
    10
    Views:
    1,676

Share This Page