Apache 1.3.4 Error in Suse 6.1 Undefined subroutine &Apache::ROOT::_7eu1
Hans Klausmann
- cgi
Hi,
Habe ein cgi das auf Suse 6.1 (Standardkonfiguration) im httpd_error.log folgendes meldet
Apache/1.3.4 Server at suse61.de Port 80
httpd: [Sat Jun 26 16:38:20 1999] [error] Undefined subroutine &Apache::ROOT::_7eu1::forum::cgi_2dbin::index_5fpl_2ecgi::start_wolfbbs called at /home/u1/public_html/forum/cgi-bin/index_pl.cgi line 158
Apache findet also eine eigen eigebaute Suroutine nicht...
Hinweis: Dasselbe Script läuft auf Suse 6.0 und auf einer SUN ohne probleme!
In der Apache Problemdatenbank fand ich folgende Infos. Mit dem unten angegebenen Sript (als .cgi nicht .pl gestartet) kann man den Fehler reproduzieren...
Der angegebene workaround allerdings funktioniert nicht...
Full text of PR # 4500:
Received: (qmail 21118 invoked by uid 2012); 31 May 1999 14:45:37 -0000
Message-Id: 19990531144537.21117.qmail@hyperreal.org
Date: 31 May 1999 14:45:37 -0000
From: michael gaida ga-mic@netcologne.de
Reply-To: ga-mic@netcologne.de
To: apbugs@hyperreal.org
Subject: apache configured with 'embedded perl' does not find subroutine.
X-Send-Pr-Version: 3.2
Number: 4500
Category: mod_perl
Synopsis: apache configured with 'embedded perl' does not find subroutine.
Confidential: no
Severity: non-critical
Priority: medium
Responsible: apache
State: closed
Class: sw-bug
Submitter-Id: apache
Arrival-Date: Mon May 31 07:50:00 PDT 1999
Last-Modified: Mon May 31 09:36:37 PDT 1999
Originator: ga-mic@netcologne.de
Organization:
Release: 1.3.4
Environment:
suse linux 6.1
Description:
I think I found something like a bug in 'embedded Perl'
in apache 1.3.4 that came with my suse 6.1 distribution:
When calling /cgi-bin/test.pl from Netscape about 10 times
I get an internal server error in 70% of the calls. The other
30% work fine. Apache or Perl do not find a subroutine.
The httpd.error_log message:
httpd: [Mon May 31 16:17:10 1999] [error] Undefined subroutine
&Apache::ROOT::cgi_2dbin::ihtmlctrl_2epl::OUTFILE called at
/usr/local/httpd/cgi-bin/test.pl line 18.
After -disbling- the following lines in httpd.conf
<Location /cgi-bin>
AddHandler perl-script .pl
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
everything worked well.
/cgi-bin/test.pl:
-----------------
#!/usr/bin/perl
require "httpdio.pl";
&OUTFILE("test.pl", 0, 0, 0);
httpdio.pl:
-----------
# bei $p1 = 0 wird kein "Content-type: text/html\n\n" ausgegeben,
# bei $p1 = 1 schon
# bei $p2 = n wird an n ter Zeile $zeile ausgegeben.
sub OUTFILE {
my $z = 0;
if ( @_ > 0 ) {
open( FILE, $_[0] );
if ( $_[1] == 1 ) {
print "Content-type: text/html\n\n" }
if ( $_[2] > 0 ) {
while(defined($i = <FILE>)) {
$z++;
if ($z == $_[2]) {
print $_[3];
print $i;
}
else {
print $i
}
}
}
else {
while(defined($i = <FILE>)) {
print $i
}
}
close(FILE);
}
}
1;
How-To-Repeat:
Fix:
Diabling embedded perl
Audit-Trail:
State-Changed-From-To: open-closed
State-Changed-By: coar
State-Changed-When: Mon May 31 09:36:37 PDT 1999
State-Changed-Why:
This database is for the base Apache package only, not for
any enhanced versions distributed by other concerns. Please
see the mod_perl Web site (http://perl.apache.org/) for
support and assistance with this problem.
Category-Changed-From-To: general-mod_perl
Category-Changed-By: coar
Category-Changed-When: Mon May 31 09:36:37 PDT 1999
Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include apbugs@Apache.Org in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]
Hallo!
Das beantwortet zwar nicht im eigentlichen Sinne Deine Frage, aber seit längerem ist Apache 1.3.6. mit zahllosen Bugfixes erschienen, der erste Schritt sollte also imho sein, den Server upzudaten.
Bei mir hatte der 1.3.4er auch einige kleinere Macken, die nach Update auf 1.3.6.verschwunden sind.
In diesem Sinne...
Dominique