Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP
Undefined subroutine error
 

Index | Next | Previous | View Flat


roberto at connexer

Nov 10, 2008, 5:01 PM


Views: 2062
Permalink
Undefined subroutine error

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
Attachments: mp.txt (6.24 KB)
  signature.asc (0.18 KB)

Subject User Time
Undefined subroutine error roberto at connexer Nov 10, 2008, 5:01 PM
    Re: Undefined subroutine error warren at etr-usa Nov 10, 2008, 9:24 PM
    Re: Undefined subroutine error roberto at connexer Nov 12, 2008, 3:03 AM
    Re: Undefined subroutine error skylos at gmail Nov 12, 2008, 9:18 AM
    Re: Undefined subroutine error roberto at connexer Nov 12, 2008, 1:28 PM
    Re: Undefined subroutine error tsirkin at gmail Nov 16, 2008, 1:04 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.