Well you probably already thought of this but: It appears that the global.asa (and thus Example::Image.pm) get compiled into different packages then templates/masthead.tmpl. Do you have UniquePackages 0 or 1 ? Maybe this is caused by a template package you are using ,is this an asp script or another one? If the problem actually _ is _ the different packages then you can of cause solve it with PerlRequire / startup script or something like that. Thanks Evgeny
On Tue, Nov 11, 2008 at 3:01 AM, Roberto C. Sánchez <[EMAIL PROTECTED]> wrote: > MP gurus, > > I recently deployed a site using Apache::ASP. I am running up against > a problem that has left me scratching my head. The site works fine on > the development server. However, on the production server, my error_log > fills with these messages: > > [Mon Nov 10 19:44:59 2008] [error] [asp] [7796] [error] Undefined subroutine > &Apache::ASP::Compiles::__ASP__srv_http_www_e_ample_com__x::get_image_data > called at /srv/http/www.example.com/templates/masthead.tmpl line 2. <--> , > /usr/share/perl5/Apache/ASP.pm line 1521 > > (I have attached the complete error log output, with debugging enabled, > for a failed request to this email.) > > The odd thing is that it is apparently intermittent. Sometimes, the > error happens and a 500 error page is returned. Other times, the page > loads as expected. > > Both servers (development and production) are running Debian Etch with > Apache 2.2.3, mod_perl 2.0.2, and Apache::ASP 2.59 (all stock versions > shipped with Debian Etch). > > The code that is generating the error is this: > > <% > my %img_data = get_image_data('masthead.png'); > %> > > My DocumentRoot is /srv/http/www.example.com and I have a directory > called /srv/http/www.example.com/Example which has my Perl modules in > it. One of the modules is called Image.pm and it has a function called > get_image_data(). In my global.asa I have "use Example::Image;". > > Something that also does not make sense to me is that if I change the > document root to something like /srv/http/example or /srv/http/site, > then the error appears to never happen. I have tested this by using > both alternate document roots for about two weeks each and it appears to > not have a problem in either case. > > There are two very strange things about this whole situation. On the > (nearly) identically configured development server, I never get the > above error. I have another site (one that is actually in production, > as opposed to the example site) that uses a similar scheme on the same > production server and it does not have this problem. > > Regards, > > -Roberto > > -- > Roberto C. Sánchez > http://people.connexer.com/~roberto > http://www.connexer.com > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFJGNlw5SXWIKfIlGQRAp2tAJ4hc3UfDt0LszN/6UTrRSErMtmnhACgv2j8 > s4zfI5IlVrRykSFjU2X3gi0= > =O++Q > -----END PGP SIGNATURE----- > >