apache2.4.2+树脂-3.1.9
为了创建mod_caucho.so,我在执行make命令时运行了resin configure,其中有一些错误:apache2.4.2+树脂-3.1.9,apache2,resin,Apache2,Resin,为了创建mod_caucho.so,我在执行make命令时运行了resin configure,其中有一些错误: /home/xsmapp/temp/resin-3.1.9/>make (cd modules/c/src; make) make[1]: Entering directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src' for dir in common apache2 resin resinssl resin_os; do (
/home/xsmapp/temp/resin-3.1.9/>make
(cd modules/c/src; make)
make[1]: Entering directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src'
for dir in common apache2 resin resinssl resin_os; do (cd $dir; make); done
make[2]: Entering directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src/common'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src/common'
make[2]: Entering directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src/apache2'
EGREP="/bin/grep -E" /home/xsmapp/temp/resin-3.1.9/libtool --silent --tag=CXX --mode=compile gcc -o mod_caucho.lo -c -I/home/xsmapp/appserver/apache-2.4.2/include -I/home/xsmapp/appserver/apr/include/apr-1 -DRESIN_HOME=\"/home/xsmapp/temp/resin-3.1.9\" -I../common -g -O2 -DPOLL -DEPOLL -D_POSIX_PTHREAD_SEMANTICS -DHAS_SOCK_TIMEOUT -DHAS_JVMTI -DHAS_JVMDI -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread mod_caucho.c
***mod_caucho.c: In function `write_env':
mod_caucho.c:588: error: structure has no member named `remote_ip'
mod_caucho.c:590: error: structure has no member named `remote_ip'
mod_caucho.c:591: error: structure has no member named `remote_addr'***
mod_caucho.c: In function `caucho_request':
mod_caucho.c:896: error: structure has no member named `remote_ip'
make[2]: *** [mod_caucho.lo] 错误 1
make[2]: Leaving directory `/home/xsmapp/temp/resin-3.1.9/modules/c/src/apache2'
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
任何帮助都将不胜感激 可能是版本问题。
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
树脂3.1.*适用于Apache2.2,但不保证适用于最新的Apache2.4
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
我使用了Apache 2.2.22+Resin3.1.8,还可以。谢谢hongtium。我必须找到一种成功编译的方法
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
vi树脂-3.1.9\modules\c\src\apache2\mod_caucho.c
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
第588行
/*
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
*/
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
第856行
//ip=r->连接->远程ip
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));
然后,你可以创建mod_caucho。那么你能重新格式化你的代码吗
if (c->remote_host)
cse_write_string(s, CSE_REMOTE_HOST, c->remote_host);
else
cse_write_string(s, CSE_REMOTE_HOST, c->remote_ip);
cse_write_string(s, CSE_REMOTE_ADDR, c->remote_ip);
sprintf(buf, "%u", ntohs(c->remote_addr->port));