Recent versions of mod_perl 1.99_xx broke with older versions of Apache::ASP, with the problem being intermittent odd server headers appearing as part of the message.
Please upgrade to the latest version of Apache::ASP and see if that helps as the last release specifically fixed this problem.
I believe the Apache::ASP that ships with the mod_perl binary that Randy Kobes nicely puts together for us is old/broken in this respect, and I would suggest bundling at least Apache::ASP version 2.57 for mod_perl 1.99_xx. I have cc'd Randy on this point.
Regards,
Josh
John Drago wrote:
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 =~ [EMAIL PROTECTED]@@; $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:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 1:16 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]