免费注册 查看新帖 |

Chinaunix

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

执行/var/www/cgi-bin下的perl脚本要什么要求啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-22 20:30 |只看该作者 |倒序浏览
在/var/www/cgi-bin/下有一个脚本,是用来监控交换机的netflow信息的,不过,在执行这个脚本出错,出错信息如下
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
apache和perl是系统默认安装(就是在装系统的时候安装的)httpd出错的信息如下:
[Wed Nov 22 20:14:56 2006] [error] [client 202.75.219.20] Premature end of script headers: CUGrapher.pl
[Wed Nov 22 20:15:12 2006] [error] [client 222.71.174.162] Can't locate rrds.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /var/www/cgi-bin/CUGrapher.pl line 13.
[Wed Nov 22 20:15:12 2006] [error] [client 222.71.174.162] BEGIN failed--compilation aborted at /var/www/cgi-bin/CUGrapher.pl line 13.
[Wed Nov 22 20:15:12 2006] [error] [client 222.71.174.162] Premature end of script headers: CUGrapher.pl
[Wed Nov 22 20:15:12 2006] [error] [client 222.71.174.162] File does not exist: /var/www/html/favicon.ico

还有一个信息是
sleep 30...
2006/11/22 20:25:10 working on file /var/netflow/ft-v05.2006-11-22.202001+0800...
2006/11/22 20:25:10 flowscan-1.020 CUFlow: Cflow::find took  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU) for 92 flow file bytes, flow hit ratio: 0/0
2006/11/22 20:25:10 flowscan-1.020 CUFlow: report took  0 wallclock secs ( 0.00 usr  0.00 sys +  0.01 cusr  0.00 csys =  0.01 CPU)
sleep 30...
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.
sleep 30...
sleep 30...

论坛徽章:
0
2 [报告]
发表于 2006-11-22 21:14 |只看该作者
怎么没人回答啊,斑竹帮帮忙撒!

论坛徽章:
0
3 [报告]
发表于 2006-11-22 22:36 |只看该作者
Hi,
原帖由 emlin128 于 2006-11-22 20:30 发表
在/var/www/cgi-bin/下有一个脚本,是用来监控交换机的netflow信息的,不过,在执行这个脚本出错,出错信息如下
[error] [client 202.75.219.20] Premature end of script headers: CUGrapher.pl
[error] [client 222.71.174.162] Can't locate rrds.pm in @INC (@INC contains: /usr/lib/
...


in your perl script "CUGrapher.pl" uses module "rrds.pm" , but not found where it is.

Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/site_perl/5.8.5/HTML/Table.pm line 1684.


Indicate your script contains undefined variable which will be furtherly accessed by Table.pm

TIPS:
test your perlscript firstly on shell command line
install or let your script to know where is rrds.pm

allawy define a varibale, avoiding to process undefined variables.


rest warning or error is harmless.

-- ulmer
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP