免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2573 | 回复: 4
打印 上一主题 下一主题

请教:apache+mod_perl,启动报perlmodule的语法错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-25 15:00 |只看该作者 |倒序浏览
20可用积分
我是apache和perl的新手,这几天测试安装socialtext这个软件,安装中的configure和make什么的都没有报明显的错误,但是安装后apache启动不起来:
# /etc/init.d/st-apache start
Starting st-apache (Apache 1.3) web server... Processing config directory: /etc/apache-perl/auto-generated.d/*.conf
Processing config file: /etc/apache-perl/auto-generated.d/nlw.conf
[Tue Aug 25 02:06:27 2009] [warn] module mod_perl.c is already added, skipping
Processing config directory: /etc/apache-perl/conf.d/rewrite*
Processing config directory: /etc/apache-perl/socialtext-conf.d/rewrite*
Syntax error on line 250 of /etc/apache-perl/auto-generated.d/nlw.conf:>>>>>>>>报错文件.
invalid top directory at /usr/share/perl/5.10/File/Find.pm line 593.
Compilation failed in require at (eval 1354) line 3.
        ...propagated at /usr/share/perl/5.10/base.pm line 92.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/Socialtext/Handler/REST.pm line 8.
Compilation failed in require at (eval 1351) line 3.


这个文件中nlw.conf中间相关内容:
102     AddModule mod_perl.c>>>>>>>>>>>mod_perl应该加载没有问题吧

242 # Order is important in these next three sections
243     <Location />
244         PerlInitHandler  +Socialtext::InitHandler
245     </Location>
246
247
248     <Location />
249         SetHandler  perl-script
250             PerlModule Socialtext::Handler::REST
251         PerlHandler Socialtext::Handler::REST
252     </Location>
253
254
255     <Location /nlw>
256         SetHandler  perl-script
257
258             PerlModule Socialtext::Handler::Authen
259
260
261        PerlHandler Socialtext::Handler::Authen
262     </Location>
263

我把有perlmodule的这三节注销了,apache就能启动,请教问题出在哪里,我可以怎么修复,谢谢!

论坛徽章:
0
2 [报告]
发表于 2009-08-25 16:17 |只看该作者
invalid top directory at /usr/share/perl/5.10/File/Find.pm line 593.
Compilation failed in require at (eval 1354) line 3.
        ...propagated at /usr/share/perl/5.10/base.pm line 92.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.0/Socialtext/Handler/REST.pm line 8.
Compilation failed in require at (eval 1351) line 3.

看看这些代码行处都是啥?

论坛徽章:
0
3 [报告]
发表于 2009-08-25 16:41 |只看该作者

回复 #1 fenglimian 的帖子

/usr/share/perl/5.10/File/Find.pm
591 sub _find_opt {
592     my $wanted = shift;
593     die "invalid top directory" unless defined $_[0];


/usr/share/perl/5.10/base.pm
86             my $sigdie;
87             {
88                 local $SIG{__DIE__};
89                 eval "require $base";
90                 # Only ignore "Can't locate" errors from our eval require.
91                 # Other fatal errors (syntax etc) must be reported.
92                 die if $@ && $@ !~ /^Can't locate .*? at \(eval /;
93                 unless (%{"$base\::"}) {
94                     require Carp;
95                     local $" = " ";
96                     Carp::croak(<<ERROR);

没看到那个地方可以贴附件,我可以把这个文件也贴上来.

谢谢了!

论坛徽章:
0
4 [报告]
发表于 2009-08-25 17:35 |只看该作者

回复 #3 fenglimian 的帖子

我测试了一下替换:
248     <Location />
249         SetHandler  perl-script
250             PerlModule Socialtext::Handler::REST
251         PerlHandler Socialtext::Handler::REST
252     </Location>
250和251行,用一个/usr/local/share/perl/5.10.0下的pm文件来替换,apache就能启动起来,不知道是在处理/usr/local/share/perl/5.10.0/Socialtext/Handler/REST.pm时候有什么问题.

论坛徽章:
0
5 [报告]
发表于 2009-08-26 16:42 |只看该作者
注销了这些行后,虽然httpd能起来,而且telnet 80端口也没有问题,
但是用浏览器浏览访问总是无法连接"Internet Explorer cannot display the webpage",从error.log里面看到每次浏览器试图连接都会产生下面的错误:
[Wed Aug 26 03:50:14 2009] [notice] child pid 30654 exit signal Segmentation fault (11)
[Wed Aug 26 04:09:52 2009] [notice] child pid 30655 exit signal Segmentation fault (11)
[Wed Aug 26 04:09:52 2009] [notice] child pid 30656 exit signal Segmentation fault (11)
[Wed Aug 26 04:28:17 2009] [notice] child pid 30657 exit signal Segmentation fault (11)
[Wed Aug 26 04:28:17 2009] [notice] child pid 30658 exit signal Segmentation fault (11)
[Wed Aug 26 04:28:17 2009] [notice] child pid 31093 exit signal Segmentation fault (11)
[Wed Aug 26 04:28:20 2009] [notice] child pid 31726 exit signal Segmentation fault (11)

我估计应该从mod_perl这里找原因.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP