For some reason, some modules shipped with 2.4.6 aren't compatible with the apr/apr-utils. Just needed to comment out modules that caused error.
apache 2.4.6, error with module apr hooks
Question
I'm trying to compile apache 2.4.6. I've successfully compiled and installed the latest apr (1.4.x) and apr-util (1.5.x).
Here are my environment settings, compilation settings, and modifications to the LD_LIBRARY_PATH after each package:
ENVPREFIX=/auto/custom-libs/linux/centos/6.x/x86_64/pkgs/httpd-2.4.6/
INSTALLPREFIX=${ENVPREFIX}
export PATH=${INSTALLPREFIX}/bin:$PATH
# APR compilation settings
./configure --prefix=${INSTALLPREFIX} --enable-other-child --enable-allocator-uses-mmap --enable-threads
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib:$LD_LIBRARY_PATH
# APR-util compilation settings
./configure --prefix=${INSTALLPREFIX} --with-apr=${ENVPREFIX}/bin/apr-1-config --with-mysql=/usr/bin/mysql --with-crypto --with-ldap-lib=${ENVPREFIX}/lib --with-ldap-include=${ENVPREFIX}/include --with-openssl=/usr/lib64/openssl
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib/apr-util-1/:$LD_LIBRARY_PATH
# Apache httpd compilation parameters
./configure --prefix=${INSTALLPREFIX} --enable-mpms-shared='all' --enable-rewrite --enable-ssl --enable-proxy --enable-cache --enable-pie --enable-mods-shared='all' --enable-ssl-staticlib-deps --enable-session --enable-proxy-balancer --enable-usertrack --with-apr=${ENVPREFIX}/bin --with-apr-util=${ENVPREFIX}/bin
make -j16
make install
export LD_LIBRARY_PATH=${INSTALLPREFIX}/lib/modules/:$LD_LIBRARY_PATH
All is well until I start a vanilla site. All I change is the port to a non-standard 8000, and the username. Unfortunately, I encounter the following error which hints at some version incompatibility with the modules shipped with the latest apache 2.4.6 code.
Command:
httpd -f `pwd`/httpd.conf
Error output:
httpd: Syntax error on line 137 of /home/prigor/codebase/pediatrics/webservices/pedws/pedws/apache/httpd.conf: Cannot load modules/mod_session_cookie.so into server: /auto/igb-libs/linux/centos/6.x/x86_64/pkgs/httpd-2.4.6/modules/mod_session_cookie.so: undefined symbol: ap_hook_session_save
Even after disabling this module, the same error persists with the remaining modules. Perhaps I'm using the incorrect version for apr and apr-util? Perhaps I've set an incorrect config switch somewhere?
Thanks in advance for your help!
La solution
Autres conseils
I've had a very similar problem some minutes ago. But after some testing I realized that the real problem was this line (from httpd.conf
):
#LoadModule session_module modules/mod_session.so
It comes commented right after building/installation. After uncommenting that line (keeping mod_session_cookie
and others also uncommented), everything worked fine.
I'm also using HTTPD 2.4.6
and APR 1.4.8
.
Just uncomment this line (from httpd.conf
):
#LoadModule session_module modules/mod_session.so