You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by john z <ze...@toad.net> on 2004/07/22 21:16:15 UTC
finding OK internal server error message
in brief, i am trying to find where modperl, asp, or apache generates the
infamous OK: The server encountered an internal error ....
hopefully there is a decent way to either drop the error message, or at the
least turn it into something that does not jar the client trying to use my
system.
i wrote a rather large system with perscript, mysql, asp, and several other
languages. the user interface with a web browser. all has worked very well.
the user queries, perlscript and asp format html packages, and things happen.
except that every 5 to 15 web pages or so, are preambled or appended with
an OK, server encountered an internal error. sometimes the preamble has a
html snippet of <html><title>200 OK. there are of course several variations
to the message. they do not seem to be produced by the same code in modperl.
i have checked the html response page and find them absolutely properl.
the database field that were supposed to be populated are populated. any
data being sent back in the page is there. all is in order except that the
preamble/ appended error message. there are no error messages issued to any
of the apache log files. nada. zip.
to date, i have attempted the following to identify the problem or remove
the error message.
1. using the Errordocument directive for apache did give me some control
for error messages issued by perl\site\lib\apache\asp\error.pm i note that
one of the active developers in modperl (stas) did make reference to
linking error-notes to the apache table.
2. adding a PerlResponseHandler gave me no influence on the process. the
OK error message occurs after the PerlLogHandler phase. this also explains
why i do not get any error messages in the log files.
3. adding a PerlOutputFilterHandler in an attempt to automatically strip
the OK error message failed. the code was fine but the error message is
generated after this process point.
4. a string search for 'server encountered' found no hits under the perl\
tree. 4 hits under apache2\ tree.
- apache2\bin\libhttpd.dll,
- and 3 non effective in apache2\manual and apache2\error
5. i am not an guru on modperl and do not have the skills/ knowledge/ and
time to become one. i do client applications. searching the modperl mailing
lists did not reveal hints that i could understand on how to suppress this
error message (or at least stop jarring clients).
i have also been looking at non standard approaches around this problem.
can anyone point me to a place in the modperl code were i can introduce
some code to check for the OK preamble/ append to change things. for
example, where exactly is the response finally written to the client
(including where the content headers, response code, etc are created).
my platform includes win2k, sp4, current mod perl distribution from randy
kobes (apache 2.0.50, mod 1.99-15, perl 5.8.4). however, this error has
been turning up with 2 prior versions of the distribution (perl 5.8.1,
5.8.3). (i did not load 5.8.2).
i must apologize for the length of the email. but i wanted to explain and
identify what i had done to this point. i am fairly sure one of the
responses will be to fix the problem so the error message does not appear.
in this case, there does not seem to be any problem and the error message
should disappear (or be made small and non alarming).
RE: finding OK internal server error message
Posted by john z <ze...@toad.net>.
tks john.
i made the include file with a PerlRequire in the conf. twas quite long
(151 records).
but still same error. i will leave the include as a permanent item since it
can not do much harm and has the potential for good.
one item that i have done is convert any $server->executes to
$response->trapinclude. i noticed that the result is proper html- as i
expected. even after all the mysql and other heavy lifting items, there are
no errors etc written.
i did a string search on the core apache code and came up empty for
'encountered'. i understand that is not all that surprising cause all the
work is done in modules.
RE: finding OK internal server error message
Posted by John Drago <jo...@e-commedia.com>.
Hi John,
When I get errors every X requests, I make sure I have pre-loaded (at server
start-up) all the modules my web application uses.
To find out which modules your server has loaded, simply place the following
code inside an ASP script:
<%
foreach my $mod ( sort {lc $a cmp lc $b} keys %INC )
{
my $file = $mod;
$mod =~ s@/@::@g;
next if $mod =~ /^\:/;
$mod =~ s@\.pm$@@;
$Response->Write("use $mod;<br>\n");
}# end foreach()
%>
Then you can copy-n-paste all those "use ..." statements into either a
<Perl> section in your httpd.conf, or place them in a perl script included
by your httpd.conf by saying:
PerlRequire C:\Perl\startup_script.pl
It's not a silver bullet, but it could help.
-- John Drago
-----Original Message-----
From: john z [mailto:zephyr@toad.net]
Sent: Thursday, July 22, 2004 1:16 PM
To: asp@perl.apache.org
Subject: finding OK internal server error message
in brief, i am trying to find where modperl, asp, or apache generates the
infamous OK: The server encountered an internal error ....
hopefully there is a decent way to either drop the error message, or at the
least turn it into something that does not jar the client trying to use my
system.
i wrote a rather large system with perscript, mysql, asp, and several other
languages. the user interface with a web browser. all has worked very well.
the user queries, perlscript and asp format html packages, and things
happen.
except that every 5 to 15 web pages or so, are preambled or appended with
an OK, server encountered an internal error. sometimes the preamble has a
html snippet of <html><title>200 OK. there are of course several variations
to the message. they do not seem to be produced by the same code in modperl.
i have checked the html response page and find them absolutely properl.
the database field that were supposed to be populated are populated. any
data being sent back in the page is there. all is in order except that the
preamble/ appended error message. there are no error messages issued to any
of the apache log files. nada. zip.
to date, i have attempted the following to identify the problem or remove
the error message.
1. using the Errordocument directive for apache did give me some control
for error messages issued by perl\site\lib\apache\asp\error.pm i note that
one of the active developers in modperl (stas) did make reference to
linking error-notes to the apache table.
2. adding a PerlResponseHandler gave me no influence on the process. the
OK error message occurs after the PerlLogHandler phase. this also explains
why i do not get any error messages in the log files.
3. adding a PerlOutputFilterHandler in an attempt to automatically strip
the OK error message failed. the code was fine but the error message is
generated after this process point.
4. a string search for 'server encountered' found no hits under the perl\
tree. 4 hits under apache2\ tree.
- apache2\bin\libhttpd.dll,
- and 3 non effective in apache2\manual and apache2\error
5. i am not an guru on modperl and do not have the skills/ knowledge/ and
time to become one. i do client applications. searching the modperl mailing
lists did not reveal hints that i could understand on how to suppress this
error message (or at least stop jarring clients).
i have also been looking at non standard approaches around this problem.
can anyone point me to a place in the modperl code were i can introduce
some code to check for the OK preamble/ append to change things. for
example, where exactly is the response finally written to the client
(including where the content headers, response code, etc are created).
my platform includes win2k, sp4, current mod perl distribution from randy
kobes (apache 2.0.50, mod 1.99-15, perl 5.8.4). however, this error has
been turning up with 2 prior versions of the distribution (perl 5.8.1,
5.8.3). (i did not load 5.8.2).
i must apologize for the length of the email. but i wanted to explain and
identify what i had done to this point. i am fairly sure one of the
responses will be to fix the problem so the error message does not appear.
in this case, there does not seem to be any problem and the error message
should disappear (or be made small and non alarming).
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org