大网数据广告活动
服务器运维问答

Compiling Apache 2.4.9 with session cookie module

· 52CE 我爱测

I compiled my Apache build with following configurations: ./configure \ --prefix=/usr/local/apache2 \ --sysconfdir=/etc/apache2 \ --enable-so \ --enable-info \ --enable-session \ --enable-session-cookie \ --enable-lua \ --enable-…

问题原文

原帖链接 · hjpotter92 · CC BY-SA 3.0

I compiled my Apache build with following configurations:

./configure \ 
    --prefix=/usr/local/apache2 \ 
    --sysconfdir=/etc/apache2 \ 
    --enable-so \ 
    --enable-info \ 
    --enable-session \ 
    --enable-session-cookie \ 
    --enable-lua \ 
    --enable-luajit \ 
    --enable-proxy \ 
    --enable-mods-shared=all \ 
    --with-included-apr
make
sudo make install

After completion of the above processes, when I try to start my server

/usr/local/apache2/bin/apachectl -k start

I receive the following error:

httpd: Syntax error on line 136 of /etc/apache2/httpd.conf: Cannot load modules/mod_session_cookie.so into server: /usr/local/apache2/modules/mod_session_cookie.so: undefined symbol: ap_hook_session_save

On checking the httpd.conf file, I see the following:

135 #LoadModule session_module modules/mod_session.so
136 LoadModule session_cookie_module modules/mod_session_cookie.so
137 LoadModule session_dbd_module modules/mod_session_dbd.so

where the number depict the line number in file. On uncommenting line #135 and attempting again displays:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

which I think is OK. But the server still hasn't started.


apachectl -V gives:

Server version: Apache/2.4.9 (Unix)
Server built:   Apr 13 2014 22:48:17
Server's Module Magic Number: 20120211:31
Server loaded:  APR 1.5.0, APR-UTIL 1.5.3
Compiled using: APR 1.5.0, APR-UTIL 1.5.3
Architecture:   32-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf"

已采纳解答

原帖链接 · hjpotter92 · CC BY-SA 3.0

The problem was unrelated to my compile settings. The server wasn't starting because the following statement was commented in my httpd.conf:

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

Uncommenting the above solved the issue.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-04-13)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。