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.

Syntax error ap_log_rerror adding mod_cloudflare

Discussion in 'EasyApache' started by kernow, Aug 15, 2013.

  1. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hi,
    Trying to install the mod_cloudflare module but although it appears to install OK we get a syntax error when restarting Apache.
    Server is Centos 5 64 bit Apache 2.4.6 and building fron source file has same problem.
    Note, this works fine on a Centos 5 32 bit Apache 2.4.6
    Full build info:
    Code:
    apxs -a -i -c mod_cloudflare.c
    /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_cloudflare.lo mod_cloudflare.c && touch mod_cloudflare.slo
    /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_cloudflare.la  -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_cloudflare.lo
    /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_cloudflare.la /usr/lib64/httpd/modules
    /usr/lib64/apr-1/build/libtool --mode=install cp mod_cloudflare.la /usr/lib64/httpd/modules/
    cp .libs/mod_cloudflare.so /usr/lib64/httpd/modules/mod_cloudflare.so
    cp .libs/mod_cloudflare.lai /usr/lib64/httpd/modules/mod_cloudflare.la
    cp .libs/mod_cloudflare.a /usr/lib64/httpd/modules/mod_cloudflare.a
    chmod 644 /usr/lib64/httpd/modules/mod_cloudflare.a
    ranlib /usr/lib64/httpd/modules/mod_cloudflare.a
    PATH="$PATH:/sbin" ldconfig -n /usr/lib64/httpd/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /usr/lib64/httpd/modules
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    chmod 755 /usr/lib64/httpd/modules/mod_cloudflare.so
    [activating module `cloudflare' in /etc/httpd/conf/httpd.conf]
     
    #1 kernow, Aug 15, 2013
    Last edited: Aug 15, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    This is the attempt using the supplied file:
    Code:
    /usr/local/src]# wget https://www.cloudflare.com/static/misc/mod_cloudflare/mod_cloudflare.latest.tar.gz
    [/usr/local/src]# tar xvzf mod_cloudflare.latest.tar.gz
    mod_cloudflare-1.2.0/
    mod_cloudflare-1.2.0/mod_cloudflare.c
    mod_cloudflare-1.2.0/configure.ac
    mod_cloudflare-1.2.0/ChangeLog
    mod_cloudflare-1.2.0/Makefile.in
    mod_cloudflare-1.2.0/LICENSE
    mod_cloudflare-1.2.0/README
    
    apxs -a -i -c mod_cloudflare-1.2.0/mod_cloudflare.c
    /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_cloudflare-1.2.0/mod_cloudflare.lo mod_cloudflare-1.2.0/mod_cloudflare.c && touch mod_cloudflare-1.2.0/mod_cloudflare.slo
    /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_cloudflare-1.2.0/mod_cloudflare.la  -rpath /usr/lib64/httpd/modules -module -avoid-version    mod_cloudflare-1.2.0/mod_cloudflare.lo
    /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_cloudflare-1.2.0/mod_cloudflare.la /usr/lib64/httpd/modules
    /usr/lib64/apr-1/build/libtool --mode=install cp mod_cloudflare-1.2.0/mod_cloudflare.la /usr/lib64/httpd/modules/
    cp mod_cloudflare-1.2.0/.libs/mod_cloudflare.so /usr/lib64/httpd/modules/mod_cloudflare.so
    cp mod_cloudflare-1.2.0/.libs/mod_cloudflare.lai /usr/lib64/httpd/modules/mod_cloudflare.la
    cp mod_cloudflare-1.2.0/.libs/mod_cloudflare.a /usr/lib64/httpd/modules/mod_cloudflare.a
    chmod 644 /usr/lib64/httpd/modules/mod_cloudflare.a
    ranlib /usr/lib64/httpd/modules/mod_cloudflare.a
    PATH="$PATH:/sbin" ldconfig -n /usr/lib64/httpd/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /usr/lib64/httpd/modules
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    chmod 755 /usr/lib64/httpd/modules/mod_cloudflare.so
    [activating module `cloudflare' in /etc/httpd/conf/httpd.conf]
    /usr/local/src]# httpd -t -D DUMP_MODULES
    httpd: Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/mod_cloudflare.so into server: /usr/lib64/httpd/modules/mod_cloudflare.so: undefined symbol: ap_log_rerror

    Next attempt build from source:
    Code:
    $ curl -k -L https://github.com/cloudflare/mod_cloudflare/tarball/master > mod_cloudflare.tar.gz
    $ tar -zxvf mod_cloudflare.tar.gz
    $ cd cloudflare-mod_cloudflare-2333a3b/
    $ autoconf
    $ ./configure
    $ make
    $ make install
    But the syntax error is the same as above.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I recommend consulting with CloudFlare directly to see how they recommend proceeding with the installation. You may want to incorporate it as a custom opt module with EasyApache. Documentation on this is at:

    EasyApache - Custom Opt Module

    Thank you.
     
  5. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    In their tests on centos 6 the mod installs without error. As I mentioned in my first post the mod also installed OK on a centos 5 32 bit box, its just the centos 5 64 bit that has the problem and remember the mod gets created its just the syntax error easyapache throws up.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The error message appears isolated to Mod_Cloudflare installation itself. Have you reported this issue to them so they can correct the installation instructions for this module with cPanel on the environment you have reproduced the issue on?

    Thank you.
     
  7. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    It appears the problem is a conflict with mod_cloudflare amd mod _rpaf which Varnish uses and or mod_remoteip , you can't install both!
     
Loading...

Share This Page