Odd error from subprogram in "required"
am 17.09.2009 21:15:33 von Bruce Johnson
I'm getting this error:
[Thu Sep 17 10:52:13 2009] [error] Undefined subroutine
&ModPerl
::ROOT
::ModPerl
::PerlRunPrefork::home_oraweb_perl_avi_login_2epl::PrintHead er called
at /home/oraweb/perl/avi/login.pl line 43, line 71.\n
[Thu Sep 17 10:52:13 2009] [error] [client 65.55.106.207] malformed
header from script. Bad header=_OF_FUNC: login.pl
[Thu Sep 17 10:52:13 2009] [warn] /avi/login.pl did not send an HTTP
header
The undefined subroutine IS defined; it's loaded via a line:
require "avi-defaults";
And the subroutine is just:
sub PrintHeader {
return "Content-type: text/html\n\n";
}
The line as called in login.pl is just:
print &PrintHeader;
Now this subroutine is called *throughout* the application, as you
might guess, every time we write a html page for display, the app is
comprised of about 40-50 different scripts.
Heck, every CGI perl script on our server uses the same code, which is
defined in the '-defaults' file for each application.
ONLY this one script is generating the error.
I've examined the file, there's no odd characters or anything in it.
--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group
Institutions do not have opinions, merely customs
Re: Odd error from subprogram in "required"
am 18.09.2009 08:09:34 von Tuomo Salo
Bruce Johnson wrote:
> I'm getting this error:
>
> [Thu Sep 17 10:52:13 2009] [error] Undefined subroutine
> &ModPerl::ROOT::ModPerl::PerlRunPrefork::home_oraweb_perl_av i_login_2epl::PrintHeader
> called at /home/oraweb/perl/avi/login.pl line 43, line 71.\n
> [Thu Sep 17 10:52:13 2009] [error] [client 65.55.106.207] malformed
> header from script. Bad header=_OF_FUNC: login.pl
> [Thu Sep 17 10:52:13 2009] [warn] /avi/login.pl did not send an HTTP header
>
> The undefined subroutine IS defined; it's loaded via a line:
>
> require "avi-defaults";
>
> And the subroutine is just:
>
> sub PrintHeader {
> return "Content-type: text/html\n\n";
> }
>
>
> The line as called in login.pl is just:
>
> print &PrintHeader;
>
> Now this subroutine is called *throughout* the application, as you might
> guess, every time we write a html page for display, the app is comprised
> of about 40-50 different scripts.
>
> Heck, every CGI perl script on our server uses the same code, which is
> defined in the '-defaults' file for each application.
I am going to hazard a guess that the other scripts run under mod_perl
(as opposed to CGI) too. If not, then you might want to check
http://perl.apache.org/docs/1.0/guide/porting.html for help in porting
the scripts.
It might not be a bad idea even otherwise, since it has a very thorough
explanation of a very similar looking scenario (scenario 1):
http://perl.apache.org/docs/1.0/guide/porting.html#Name_coll isions_with_Modules_and_libs
Hope this helps.
-Tuomo
Re: Odd error from subprogram in "required"
am 18.09.2009 18:26:19 von Bruce Johnson
On Sep 17, 2009, at 11:09 PM, Tuomo Salo wrote:
>>
>> Heck, every CGI perl script on our server uses the same code, which
>> is
>> defined in the '-defaults' file for each application.
>
> I am going to hazard a guess that the other scripts run under mod_perl
> (as opposed to CGI) too. If not, then you might want to check
> http://perl.apache.org/docs/1.0/guide/porting.html for help in porting
> the scripts.
When I looked more closely at the errors, they seemed to have been
generated by a MSN searchbot, how I don't know.
All of them were from IP addresses in the range 65.55.106.
which resolve to: msnbot-65-55-106-.search.msn.com.
It was complete happenstance that when I tested it, the msnbot hit it;
I was focusing more on the mod_perl error than looking for the
original error.
We have tracked down most, if not all of the bugs we had when we went
to the mod_perl system; I've got a well-thumbed copy of the porting
guide on my desk at this moment :-)
--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group
Institutions do not have opinions, merely customs