[prev] [thread] [next] [Date index for 2005/01/03]
I will apologize in advance if the following explanation is not clear. I had a hard time trying to describe it. I am setting up a light/heavy reverse proxy. I'm using ProxyRemoteAddr to capture the forwarded IP address of the client. The heavy version using Mod_Perl. Environment is Solaris 8. All custom perl modules are stored in a "non-standard" directory and the scripts that reference these modules all have a 'use lib' statement so the scripts know where to find the appropriate modules. When running the servers without 'ProxyRemoteAddr' everything works fine. When 'ProxyRemoteAddr' is enabled I encounter the following error: Can't locate foo.pm in @INC When 'ProxyRemoteAddr' is disabled the problem goes away. Example. Testscript.cgi will has several 'require foo' statements to load modules as they are required depending on how this script is called. So if it is called with one set or parameters it will execute 'require foo;' called with a different set of parameters it may execute 'require fee;' instead. Running with 'ProxyRemoteAddr' enabled I can call testscript.cgi without a problem as long as I don't vary the parameters it is sent. After the first call any change which requires it to load a new module via the 'require fee;' command will cause the script to die with the error 'Can't locate fee.pm in @INC). When using the light heavy configuration I can run a script multiple times as long as the script only requires the same set of modules each time. If I call the script with a different set of parameters which would require it to call a different set of modules then it dies with the error message that it could not find the requested module in @INC. If I reverse the order the error still happens when the script is called the second time. I traced this issue to the use of: ProxyRemoteAddr. If I do not call this routine then the problem does not occur. It is as if the module list is "locked" when the script is first called and subsequent calls will not load any new modules. If I add the 'use lib' statement to a startup script so it loads the library directory the problem will go away, as far as the limits of my testing are concerned. I would however like to understand why this is occurring. Any help/insight is greatly appreciated. Thanks. -- 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
![]() |
[SITE] Can't locate foo.pm in @INC
|
![]() |
![]() |
Re: [SITE] Can't locate foo.pm in @INC
|
Generated at 12:16 on 16 Jan 2005 by mariachi v0.52