精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
This message happens when the client breaks the connection while your script is trying to write to the client. With Apache 1.3.x, you should only see the rwrite messages if LogLevel is set to debug.
这个消息发生在客户端中断连接而你的脚本试图写入客户端时。在Apache 1.3.x中,如果LogLevel设置为调试时,你应该只看到改写消息。
There was a bug that reported this debug message regardless of the value of the LogLevel directive. It was fixed in mod_perl 1.19_01. 有一个程序错误,不管LogLevel指令的值也会报告调试消息。它在mod_perl 1.19 _01中已解决。
Generally LogLevel is either debug or info. debug logs everything, info is the next level, which doesn’t include debug messages. You shouldn’t use "debug" mode on your production server. At the moment there is no way to prevent users from aborting connections 一般来说,LogLevel调试或输出信息。调试记录所有信息到日志里,输出信息是下一个层次,不包括调试消息。你不应该在成品服务器上使用“调试”模式。在现在没有办法防止用户中断连接时使用。
That’s the $SIG{PIPE} handler installed by mod_perl/Apache::SIG, which is called if a connection times out or if the client presses the ’Stop’ button. It gives you an opportunity to do cleanups if the script was aborted in the middle of its execution. 通过mod_perl/Apache::SIG安装的$SIG{PIPE} }处理程序,被称为如果连接超时或者客户端按下“停止”按钮。,如果脚本在其执行时被终止,这给了你一个机会去做清理。
The script below will print a warning like that above, moreover it will print the whole script as a part of the warning message: 下面的脚本将打印上面这样的警告,而且它将打印整个脚本的一部分警告信息:
#!/usr/bin/perl -w
use strict;
print "Content-type: text/html\n\n";
print "Hello $undefined";
Global symbol "$undefined" requires
explicit package name at /usr/apps/foo/cgi/tmp.pl line 4.
eval ’package Apache::ROOT::perl::tmp_2epl;
use Apache qw(exit);sub handler {
#line 1 /usr/apps/foo/cgi/tmp.pl
BEGIN {$^W = 1;}#!/usr/bin/perl -w
use strict;
print "Content-type: text/html\\n\\n";
print "Hello $undefined";
}
;’ called at
/usr/apps/lib/perl5/site_perl/5.005/aix/Apache/Registry.pm
line 168
Apache::Registry::compile(’package
Apache::ROOT::perl::tmp_2epl;use Apache qw(exit);sub han...’)
called at
/usr/apps/lib/perl5/site_perl/5.005/aix/Apache/Registry.pm
line 121
Apache::Registry::handler(’Apache=SCALAR(0x205026c0)’)
called at /usr/apps/foo/cgi/tmp.pl line 4
eval {...} called at /usr/apps/foo/cgi/tmp.pl line 4
[Sun Nov 15 15:15:30 1998] [error] Undefined subroutine
&Apache::ROOT::perl::tmp_2epl::handler called at
/usr/apps/lib/perl5/site_perl/5.005/aix/Apache/Registry.pm
line 135.
[Sun Nov 15 15:15:30 1998] [error] Goto undefined subroutine
&Apache::Constants::SERVER_ERROR at
/usr/apps/lib/perl5/site_perl/5.005/aix/Apache/Constants.pm
line 23.
The error is simple to fix. When you use the use strict; pragma (and you should...), Perl will insist that all variables are defined before being used, so the error will not arise. 当你严格使用时,这个错误很容易修复:pragma(你应该…),Perl在使用之前会坚持定义所有变量,所以不会出现错误。
The bad thing is that sometimes the whole script (possibly, thousands of lines) is printed to the error_log file as code that the server has tried to eval()uate. 糟糕的是,有时整个脚本(可能数千行)是被打印到error_log文件,服务器试图eval的这个文件里的内容,把它当代码。
May be you have a $SIG{__DIE__} handler installed (Carp::confess()?). If so that’s what’s expected. 可能你有$SIG{__DIE__}处理程序安装Carp::confess()?)。如果是这样,这就是预期的。
You might wish to try something more terse such as "local $SIG{__WARN__} = \&Carp::cluck;" The confess method is very verbose and will tell you more than you might wish to know including full source 您可能希望尝试更简洁一点的,如“local $SIG{__WARN__} = \&Carp::cluck;,”这个方法是非常详细的,而且会告诉你更多,包括完整的源代码。