Search the web
Sign In
New User? Sign Up
apache-asp · Apache::ASP
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Undefined subroutine error   Message List  
Reply | Forward Message #2250 of 2276 |
Re: Undefined subroutine error

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
<roberto@...> 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-----
>
>


Sun Nov 16, 2008 9:04 pm

tsirkin@...
Send Email Send Email

Forward
Message #2250 of 2276 |
Expand Messages Author Sort by Date

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...
Roberto C. Sánchez
roberto@...
Send Email
Nov 11, 2008
1:02 am

... Don't know if this will help, but try "rm -rf /tmp/asp". (Assuming you're using the default State DB setup.) Then restart Apache. If the state DB gets...
Warren Young
warren@...
Send Email
Nov 11, 2008
5:24 am

... I am using this setting: PerlSetVar NoState 1 So, I don't think your suggestion will help. Regards, -Roberto -- Roberto C. Sánchez ...
Roberto C. Sánchez
roberto@...
Send Email
Nov 12, 2008
11:04 am

Apache::Asp caches subroutine compiles within processes. Kill all running apache processes to delete their cache. (you don't strictly have to restart to do...
Skylos
skylos@...
Send Email
Nov 12, 2008
5:18 pm

... Thing is that this is happening to me on a production setup. I am not changing anything. Even completely stopping Apache and starting it fresh does not...
Roberto C. Sánchez
roberto@...
Send Email
Nov 12, 2008
9:28 pm

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...
Tsirkin Evgeny
tsirkin@...
Send Email
Nov 16, 2008
9:05 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help