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.

PCRE version compiled by EasyApache and used by mod_rewrite

Discussion in 'EasyApache' started by regex, Dec 29, 2013.

  1. regex

    regex Member

    Joined:
    Jul 24, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi there,
    I am trying to find out which version of PCRE mod_rewrite is using.
    There are several versions of PCRE on the host. The version used by PHP is easy to see via phpinfo().
    I have a feeling that mod_rewrite is using a much older version of PCRE, perhaps 7.x.

    I am not finding the details in EasyApache, and ldd /usr/sbin/httpd returns "not a dynamic executable".
    Would be grateful for any clues about how to figure this out. :)

    In advance, many thanks.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    The version of PCRE installed by EasyApache is found in the /opt directory. You can check the version via:

    Code:
    /opt/pcre/bin/pcretest -C
    If you are having issues with Apache being linked to the wrong version of PCRE, ensure you review internal case 58625:

    [Case 58625] PCRE problems

    Thank you.
     
  3. regex

    regex Member

    Joined:
    Jul 24, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello Michael,
    thank you for your kind reply.

    To make sure I understand, does this mean, then, that every component reported by httpd -l that might use pcre will use the version in the /opt directory?

    I ask because there seem to be three versions: 7.8, 8.21, 8.31:

    pcretest -C => version 7.8
    /usr/bin/pcretest -C => version 7.8
    /opt/pcre/bin/pcretest -C => version 8.21
    /home/virtfs/user/opt/pcre/bin/pcretest -C => version 8.21
    /home/virtfs/user/usr/local/cpanel/3rdparty/bin/pcretest -C => version 8.31
    /home/virtfs/user/usr/bin/pcretest -C => version 7.8
    /usr/local/cpanel/3rdparty/bin/pcretest -C => version 8.31

    I see that PHP uses the pcre in the folder you mentioned: "--with-pcre-regex=/opt/pcre"

    But just want to make sure about the components reported by httpd -l

    Thanks heaps,
    Wishing you a beautiful last day of the year
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, Apache should utilize the version of PCRE found in the /opt directory. However, there is an existing bug that results in this not happening in some cases. It's referenced here:

    [Case 58625] PCRE problems

    Thank you.
     
Loading...

Share This Page