Jie Gao wrote: [...]
I find I get this kind of error message with almost all accesses.
I get this when accessing server-status:
[Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine main:: called at -e line 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e line 0\n\teval {...} called at -e line 0\n [Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine main:: called at -e line 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e line 0\n\teval {...} called at -e line 0\n [Sat May 29 21:41:07 2004] [error] [client 129.xxx.xxx.100] Undefined subroutine main:: called at -e line 0\n\tApache::porting::__ANON__('Apache::RequestRec=SCALAR(0x83b32c)') called at -e line 0\n\teval {...} called at -e line 0\n
and this while accessing perl-status:
[Sat May 29 21:42:23 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::129.xxx.xxx.xxx called at -e line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc [Sat May 29 21:42:30 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::gzip,deflate called at -e line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc [Sat May 29 21:42:35 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::129.xxx.xxx.xxxxx called at -e line 0\n, referer: http://wasm-test.auth.usyd.edu.au/perl-status?inc
[Sat May 29 21:42:56 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::129.xxx.xxx.21 called at -e line 0\n [Sat May 29 21:43:00 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q= 0.2,*/*;q=0.1 called at -e line 0\n [Sat May 29 21:43:08 2004] [error] [client 129.xxx.xxx.xxx] Undefined subroutine main::129.xxx.xxx.xxx called at -e line 0\n
Looks definitely like %ENV problem, although it only shows in the error_log.
Most likely it's a problem with UNIVERSAL::AUTOLOAD. Using the $SIG{__DIE__} trick you should be able to see who called those non-existing functions.
I think you are using mp2 enough time to start porting the applications for real, and drop any helper tools which aren't perfect. As the Apache::porting manpage mentions we have discussed and worked on developing a better AUTOLOAD technique (which doesn't use UNIVERSAL), but even that one wasn't perfect. If you are interested to try it, search the archives for EazyLife:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&w=2&r=1&s=eazylife&q=b
I think the latest version was:
package ModPerl::EazyLife;
use ModPerl::MethodLookup (); use Carp;
my @avail_modules = ModPerl::MethodLookup::avail_modules(); push @avail_modules, 'Apache'; # XXX: may go away my $skip = qr|(::)?DESTROY$|; for my $module (@avail_modules) { *{"$module\::AUTOLOAD"} = sub { my($hint, @modules) = ModPerl::MethodLookup::lookup_method($AUTOLOAD, @_);
# there should be only one match if (my($module) = @modules) { eval "require $module"; # use the function from the module that we have just loaded $AUTOLOAD =~ s/.*::/${module}::/; goto &$AUTOLOAD; } else { return if $AUTOLOAD =~ /$skip/; croak $hint || "Can't find $AUTOLOAD"; } }; }
1;
You just need to load this module at the server startup, instead of Apache::porting. The quoted thread discusses some limitations. But it wasn't finished. Give it a try.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html