0

我已经安装了 Apache::PageKit 模块,在测试这个模块时它显示以下错误。

但是模块的可用性,在它下面使用

bash-3.2$
bash-3.2$ perl -MApache::PageKit -e1
bash-3.2$

bash-3.2$ ./t/TEST -start-httpd
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
/install/others/apache2/bin/httpd  -d /install/others/Apache-PageKit-1.14/t -f /install/others/Apache-PageKit-1.14/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.25 (prefork MPM)

waiting 60 seconds for server to start: .Syntax error on line 24 of /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf:
Can't locate loadable object for module Apache::URI in @INC (@INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted\t(in cleanup) Can't locate loadable object for module Apache::URI in @INC (@INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\n
[  error]
server has died with status 255 (t/logs/error_log wasn't created, start the server in the debug mode)
sh: line 1: 25604 Terminated              /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
bash-3.2$
bash-3.2$
bash-3.2$
bash-3.2$ perl -MApache::URI -e1
bash-3.2$

这里第 24 行是<Perl>. 所以 pagekit 无法解析这一行。

bash-3.2$ vi /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf
# WARNING: this file is generated (from /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf.in), do not edit
# generated on Thu Jul 11 08:09:38 2013
# 01: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:961
# 02: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:979
# 03: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1452
# 04: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1564
# 05: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:502
# 06: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRunPerl.pm:107
# 07: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 08: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 09: /install/others/Apache-PageKit-1.14/t/TEST:72

# Apache::Reload is very very helpfull during development,
# but it is not required. So install it and uncomment
# the following lines
#
# PerlModule Apache::Reload
# PerlInitHandler Apache::Reload
# PerlSetVar ReloadAll On

# <Perl >
<Perl>

# It is not necasary to preload this modules, but it helps

我该如何解决这个问题。

感谢
Shanmugam A。

你好,

感谢您的回复,现在我已经为这个组合安装了 Perl 5.8.8、Apache 2.2.25、Modperl 2.0.8 和 Apache2::PageKit,我在启动 apache 时出现以下错误。

bash-3.2$
bash-3.2$ /install/others/apache2/bin/apachectl start
[Mon Jul 15 11:28:10 2013] [error] Can't locate loadable object for module Apache::Constants in @INC (@INC contains: /install/others/lib/perl5/5.8.8 /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/bin. /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /install/others/apache2) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14.\nCompilation failed in require at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nBEGIN failed--compilation aborted at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nCompilation failed in require at (eval 2) line 3.\n
[Mon Jul 15 11:28:10 2013] [error] Can't load Perl module ModPerl::P2 for server (null):0, exiting...

注意:这里我设置从 Unix 到 Linux 服务器。在 Unix 中,它是 Apache 1.3.27、mod_perl 1.27 Apache::PageKit 的组合,而在 Apache Configuration 下面是默认添加的附加部分

#################################################################
<IfModule mod_perl.c>
  PerlModule ModPerl::P2
  <Location /P2>
     SetHandler perl-script
     PerlHandler ModPerl::P2
     PerlSendHeader On
  </Location>

  PerlModule ModPerl::P1
  <Location /P1>
     SetHandler perl-script
     PerlHandler ModPerl::P1
     PerlSendHeader On
  </Location>

  PerlModule Apache::DBI
#### Entered by Tom Frizzell April 25 2008
  PerlFixupHandler Apache::SIG

</IfModule>

###############################################################
# PageKit setup
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID TAPEMON_HOME TAPEMON_LIB

<Perl>
use lib "/chshttp/prod/qtngsas70/DSOMP/lib";
</Perl>

SetHandler perl-script
PerlSetVar PKIT_ROOT /chshttp/prod/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test

PerlHandler +Apache::PageKit
<Perl>
        Apache::PageKit->startup('/chshttp/prod/qtngsas70/DSOMP/www', 'test');
</Perl>

PerlInitHandler +Apache::Reload
# Error Handling
PerlModule Apache::ErrorReport
PerlSetVar ErrorReportHandler display

此配置我已将所有 Apache::PageKit 更改为 Apache2::PageKit 以及相应的源代码。我刚刚将文件 ModPerl::P1 和 ModPerl::P2 从 Unix 服务器复制到 Linux。但它显示了如上的错误。

我知道如何解决这个问题吗?

谢谢

你好,

当我访问该页面时显示 500 内部错误。并且apache日志说(在perl模块Apache :: SIG中找不到对象方法“is_main”)。我知道如何解决这个问题吗?

bash-3.2$ more error_log
[Sun Jul 14 09:38:12 2013] [notice] Apache/2.2.25 (Unix) configured -- resuming normal operations
[Sun Jul 14 09:40:01 2013] [notice] caught SIGTERM, shutting down
[Tue Jul 16 06:39:59 2013] [notice] Apache/2.2.25 (Unix) mod_perl/2.0.8 Perl/v5.8.8 configured -- resuming normal operations
[Tue Jul 16 06:41:01 2013] [error] [client 10.191.51.22] Can't locate object method "is_main" via package "Apache2::RequestRec" at /install/
others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/SIG.pm line 14.\n

我更新的 apache 配置是

#################################################################
<IfModule mod_perl.c>
  PerlModule ModPerl::P2
  <Location /P2>
     SetHandler perl-script
     PerlHandler ModPerl::P2
#    PerlSendHeader On
      PerlOptions +ParseHeaders
  </Location>

  PerlModule ModPerl::P1
  <Location /P1>
     SetHandler perl-script
     PerlHandler ModPerl::P1
#    PerlSendHeader On
      PerlOptions +ParseHeaders
  </Location>
  PerlModule Apache::DBI
  PerlFixupHandler Apache::SIG  
  LogFormat "%h %l %u %t \"%r\" %s %b %{SIGPIPE}e"
</IfModule>

###############################################################
# PageKit setup  TAPEMON_HOME TAPEMON_LIB
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID 

<Perl>
    use mod_perl2;

    # It is not necasary to preload this modules, but it helps
    # to find errors in your instalation.

    use Apache2::URI ();
    use Apache2::Cookie ();
    use Apache2::Request ();
    use Apache::SessionX ();
    use Apache2::Util ();
    use Compress::Zlib ();
    use File::Find ();
    use HTML::FillInForm ();
    use HTML::Parser ();
    use HTML::Template ();
    use XML::LibXML ();

    use Apache2::PageKit();
    use lib "/dso/dsoapps/iesdev/qtngsas70/DSOMP/lib";
</Perl>


SetHandler perl-script
PerlSetVar PKIT_ROOT /dso/dsoapps/iesdev/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test
PerlHandler +Apache2::PageKit
<Perl>
        Apache2::PageKit->startup('/dso/dsoapps/iesdev/qtngsas70/DSOMP/www', 'test');
</Perl>

PerlInitHandler +Apache2::Reload
# Error Handling
PerlModule Apache2::ErrorReport
PerlSetVar ErrorReportHandler display

我知道我该如何解决这个问题吗

感谢
Shanmugam A。

4

1 回答 1

0

看起来 Apache-PageKit 仅适用于 mod_perl1,但不适用于 mod_perl2(后者将使用 Apache2::URI,而不是 Apache::URI)。所以你可能应该寻找替代方案,或者如果你真的需要这个模块,那么你必须找到一种在你的系统上安装 Apache1 和 mod_perl1 的方法。

于 2013-07-11T14:38:09.967 回答