You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Matthew Kennedy <mk...@opushealthcare.com> on 2002/01/28 19:46:59 UTC

help: LWP::Simple within a mod_perl context

Hello, I am using LWP::Simple within a mod_perl context to retrieve
content from an external site within a request to our site. I've
installed LWP::Simple correctly, however is doesn't work within mod_perl
and (I suspect) it doesn't work work within a regular CGI app.

I wrote a simple script and ran it "su - apache -c '/path/to/script'"
and it doesn't return any content. It does return content for real user
id's though (eg. su - mkennedy ...). So I suspect the apache user cannot
use LWP::Simple because LWP::Simple is requiring some rights user apache
does not have.

I'm not sure where to begin looking to solve this problem... Any ideas?

Matthew


Re: help: LWP::Simple within a mod_perl context

Posted by darren chamberlain <dl...@users.sourceforge.net>.
Matthew Kennedy <mk...@opushealthcare.com> said something to this effect on 01/28/2002:
> Hello, I am using LWP::Simple within a mod_perl context to
> retrieve content from an external site within a request to our
> site. I've installed LWP::Simple correctly, however is doesn't
> work within mod_perl and (I suspect) it doesn't work work
> within a regular CGI app.
> 
> I wrote a simple script and ran it "su - apache -c
> '/path/to/script'" and it doesn't return any content. It does
> return content for real user id's though (eg. su - mkennedy
> ...). So I suspect the apache user cannot use LWP::Simple
> because LWP::Simple is requiring some rights user apache does
> not have.

Have you tried running this as the apache user:

$ /path/to/perl -MLWP::Simple -le 'getprint "http://my.url/to/get"'

This will tell you if the problem is with LWP::Simple or
something else.

Next, do a little ls -l `perldoc -l LWP::Simple` and make sure
that the permissions are right.

(darren)

-- 
Whatever is done for love is beyond good and evil.
    -- Friedrich Neitzsche