> I suspect that the perl compiled with mod_perl was a different perl than the
> one you expected. I'll take a look and see if I can't make that error
> message a bit better (like spitting out @INC as well or something).
ok, this patch seems to be a bit better. if I remove Apache.pm from perl's
site_lib I get this in my error log instead:
Apache.pm failed to load! (Can't locate Apache.pm in @INC (@INC contains:
/perl/perl-5.8.6/lib/5.8.6/i686-linux-thread-multi, ...) at (eval 3) line 3.
).
I'll commit it early next week unless anyone gripes.
--Geoff
Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.147
diff -u -r1.147 mod_perl.c
--- src/modules/perl/mod_perl.c 2 Oct 2003 21:30:35 -0000 1.147
+++ src/modules/perl/mod_perl.c 12 Feb 2005 18:28:02 -0000
@@ -513,8 +513,15 @@
require_Apache(NULL);
- if(!(version = perl_get_sv("Apache::VERSION", FALSE)))
- croak("Apache.pm failed to load!"); /*should never happen*/
+ if(!(version = perl_get_sv("Apache::VERSION", FALSE))) {
+ /* should never happen but might if the perl mod_perl
+ * was built with isn't around anymore
+ */
+ croak("Apache.pm failed to load! (%s)",
+ SvTRUE(ERRSV) ? SvPV(ERRSV,na) : "no error?"
+ );
+ }
+
if(strEQ(SvPV(version,n_a), MP_APACHE_VERSION)) /*no worries*/
return;