Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: module not found errors in a mod_perl handler

by hippo (Bishop)
on Dec 15, 2022 at 18:58 UTC ( [id://11148897]=note: print w/replies, xml ) Need Help??


in reply to module not found errors in a mod_perl handler

The error message suggests that the user mod_perl is running under does not have permissions to read /my/handler/lib/HTTP/Config.pm so if you go up the tree from there until you find the offending directory and allow read perms for the mod_perl user that might be all that is needed. Worth a try, anyway.

Are you on a system using SELinux or AppArmor? That might also be a consideration.


🦛

Replies are listed 'Best First'.
Re^2: module not found errors in a mod_perl handler
by tomgracey (Scribe) on Dec 15, 2022 at 19:18 UTC

    Thanks for your suggestion. Sorry to be clear, HTTP::Config is not located in the /my/handler/lib directory - this only has my custom hander in it. HTTP::Config (and other installable perl modules) are located in the perlbrew install directories. I have checked permissions on these dirs, and they are r and x for all users.

    In this case I'm on Centos7.9 with no SELinux/AppArmor.

      Sorry to be clear, HTTP::Config is not located in the /my/handler/lib directory

      Yes, I understood that and it doesn't matter whether the module is there or not. You have set it up so that the process looks there first and if it doesn't have the rights to do so, that results in the fatal error message you have seen. Here's a trivial demo of this principle:

      $ perl -I/root/bin -e 'use CGI' Can't locate CGI.pm: /root/bin/CGI.pm: Permission denied at -e line +1. BEGIN failed--compilation aborted at -e line 1. $ perl -e 'use CGI' $

      The first attempt fails because my (non-root) user has no access to the first path in @INC. The second one succeeds.


      🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found