You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Grant <em...@yahoo.com> on 2004/06/28 22:58:57 UTC

startup.pl confusion

I have enabled mod_perl for apache2, and that appears
to be working fine.  Now I need to get a mod_perl
module called Interchange::Link running.  It is
supposed to let me access my pages like this:

mydomain.com/sample.html 

instead of this: 

mydomain.com/cgi-bin/catalog/sample.html 

Since the former still doesn't work, I don't think the
module is loading properly.  I think where I'm stuck
is the startup.pl file that is supposed to tell the
system where the Interchange::Link.pm file is. I have
the file in /usr/lib/perl5/site_perl/5.8.2/startup.pl
and it contains:

use lib qw(/usr/lib/perl5/site_perl/5.8.2);1; 

which seems kind of redundant to me, but it seems to
be what the brief Interchange::Link README file asks
for. I then have the following:

/usr/lib/perl5/site_perl/5.8.2/Interchange/Link.pm 

Does anyone see where I might be slipping up? 

 - Grant


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
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


Re: startup.pl confusion

Posted by Grant <em...@yahoo.com>.
--- Perrin Harkins <pe...@elem.com> wrote:
> Grant wrote:
> > My httpd.conf file is apache2.conf after being set
> up
> > by Gentoo and there doesn't seem to be any mention
> of
> > which user and group it runs as.
> 
> If you start it as root, then I believe it defaults
> to "nobody" when 
> User is not specified.
> 
> > The Link.pm file is
> > unreadable to me.
> 
> Not a good sign.  If the authors of the software
> won't help you and you 
> can't understand their code, this may not be the
> best choice for you.
> 
> > Would it be safe to let the user in
> > question rwx the socket file?
> 
> I can't really say, given that I don't know what the
> purpose of the 
> socket is or what Interchange::Link might use it
> for.  This is something 
> you need to find out from a person familiar with
> Interchange.
> 
> - Perrin
> 

I am extremelly happy to report that I now have this
working.  I found an important thread in the
Interchange mailing list archives.  The user running
apache2 turned out to be apache, and that was set up
automatically in case anyone is interested.

I'm sorry if I've been an eyesore, but I've learned a
lot about apache and linux through getting this to
work.  I won't be quite so helpless the next time.

Thanks a lot for everyone's help!

- Grant


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
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


Re: startup.pl confusion

Posted by Perrin Harkins <pe...@elem.com>.
Grant wrote:
> My httpd.conf file is apache2.conf after being set up
> by Gentoo and there doesn't seem to be any mention of
> which user and group it runs as.

If you start it as root, then I believe it defaults to "nobody" when 
User is not specified.

> The Link.pm file is
> unreadable to me.

Not a good sign.  If the authors of the software won't help you and you 
can't understand their code, this may not be the best choice for you.

> Would it be safe to let the user in
> question rwx the socket file?

I can't really say, given that I don't know what the purpose of the 
socket is or what Interchange::Link might use it for.  This is something 
you need to find out from a person familiar with Interchange.

- Perrin

-- 
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


Re: startup.pl confusion

Posted by Grant <em...@yahoo.com>.
--- Perrin Harkins <pe...@elem.com> wrote:
> On Mon, 2004-06-28 at 18:54, Grant wrote:
> > Sorry to be such a newbie, but how can I find out
> what
> > user apache2 runs as and make sure that user has
> the
> > permissions it needs?
> 
> Look in httpd.conf.  It will say which user and
> group it runs as.  Then
> read the Interchange::Link code to find out what
> it's doing with the
> socket (read, write, whatever).  Change the
> permissions on the socket to
> let that user do what it needs to.  
> 
> - Perrin

Perrin,

My httpd.conf file is apache2.conf after being set up
by Gentoo and there doesn't seem to be any mention of
which user and group it runs as.  The Link.pm file is
unreadable to me.  Would it be safe to let the user in
question rwx the socket file?

- Grant

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
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


Re: startup.pl confusion

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2004-06-28 at 18:54, Grant wrote:
> Sorry to be such a newbie, but how can I find out what
> user apache2 runs as and make sure that user has the
> permissions it needs?

Look in httpd.conf.  It will say which user and group it runs as.  Then
read the Interchange::Link code to find out what it's doing with the
socket (read, write, whatever).  Change the permissions on the socket to
let that user do what it needs to.  

- Perrin


-- 
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


Re: startup.pl confusion

Posted by Grant <em...@yahoo.com>.
--- Perrin Harkins <pe...@elem.com> wrote:
> On Mon, 2004-06-28 at 18:15, Grant wrote:
> > ok= defined=
> > sockname=/usr/local/interchange/etc/socket:
> Permission
> > denied
> [...]
> > The socket file looks like this:
> > 
> > srw-------  1 interch users    0 Jun 28 11:35
> socket
> 
> You need to check what user your apache servers runs
> as (probably
> "nobody") and make sure that user has permissions to
> do whatever the 
> module is trying to do with that socket.

Sorry to be such a newbie, but how can I find out what
user apache2 runs as and make sure that user has the
permissions it needs?

- Grant

> 
> > I have asked the Interchange list without any
> help. 
> > IC is an awesome piece of software, but it can be
> very
> > tough to get answers out of the list.
> 
> Not really a ringing endorsement...  We're happy to
> help with mod_perl
> problems, but this is sounding like a problem
> specific to the
> Interchange code which I don't know much about.
> 
> > P.S. I'm getting 2-3 copies of some messages on
> this
> > list, and they seem to be written to me with a CC
> to
> > the list.  Is this configurable?
> 
> When people hit "reply all" they get your address in
> the To: field and
> the list in the Cc: field.  There is some info on it
> here:
> http://perl.apache.org/maillist/email-etiquette.html
> 
> - Perrin
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
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


Re: startup.pl confusion

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2004-06-28 at 18:15, Grant wrote:
> ok= defined=
> sockname=/usr/local/interchange/etc/socket: Permission
> denied
[...]
> The socket file looks like this:
> 
> srw-------  1 interch users    0 Jun 28 11:35 socket

You need to check what user your apache servers runs as (probably
"nobody") and make sure that user has permissions to do whatever the 
module is trying to do with that socket.

> I have asked the Interchange list without any help. 
> IC is an awesome piece of software, but it can be very
> tough to get answers out of the list.

Not really a ringing endorsement...  We're happy to help with mod_perl
problems, but this is sounding like a problem specific to the
Interchange code which I don't know much about.

> P.S. I'm getting 2-3 copies of some messages on this
> list, and they seem to be written to me with a CC to
> the list.  Is this configurable?

When people hit "reply all" they get your address in the To: field and
the list in the Cc: field.  There is some info on it here:
http://perl.apache.org/maillist/email-etiquette.html

- Perrin


-- 
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


Re: startup.pl confusion

Posted by Grant <em...@yahoo.com>.
--- Perrin Harkins <pe...@elem.com> wrote:
> On Mon, 2004-06-28 at 16:58, Grant wrote:
> > Since the former still doesn't work, I don't think
> the
> > module is loading properly.  I think where I'm
> stuck
> > is the startup.pl file that is supposed to tell
> the
> > system where the Interchange::Link.pm file is.
> 
> What makes you think this?  Do you have error
> messages?  You're not
> giving us much to go on.  Have you asked the
> Interchange developers who
> wrote the module about this?


I had forgotten to check my error_log file.  Sorry
about that.  I have many entries in error_log like
this:

ok= defined=
sockname=/usr/local/interchange/etc/socket: Permission
denied

I have defined in my apache2.conf file:

<Location /foundation>
SetHandler perl-script
PerlResponseHandler Interchange::Link
PerlOptions +GlobalRequest
PerlSetVar InterchangeServer
/usr/local/interchange/etc/socket
</Location>

The socket file looks like this:

srw-------  1 interch users    0 Jun 28 11:35 socket

I have asked the Interchange list without any help. 
IC is an awesome piece of software, but it can be very
tough to get answers out of the list. 
Interchange::Link is totally brand new.


> > use lib qw(/usr/lib/perl5/site_perl/5.8.2);1; 
> > 
> > which seems kind of redundant to me
> 
> To me too.  I doubt that is accomplishing anything.
> 
> - Perrin

This is everything the Interchange::Link README file
says about installation:

INSTALLATION
    You must specify that Apache use mod_perl, and you
must tell it where to
    find the Perl modules you want to use.

    On a Red Hat Linux system you might copy this file
to
    /usr/lib/httpd/perl/ via this procedure:

        mkdir -p /usr/lib/httpd/perl/Interchange
        cp Link.pm /usr/lib/httpd/perl/Interchange

    Then you provide a startup script that tells
mod_perl where its
    libraries are:

        cd /usr/lib/httpd/perl
        echo "use lib qw(/usr/lib/httpd/perl);1;" >
startup.pl

    Then you can put in your
/etc/httpd/conf/httpd.conf:

        PerlModule Apache2
        PerlRequire /usr/lib/httpd/perl/startup.pl

    Finally, you specify a location like:

      <Location /foundation>
        SetHandler perl-script
         PerlResponseHandler  Interchange::Link
         PerlOptions +GlobalRequest
         PerlSetVar InterchangeServer
/var/run/interchange/socket
         PerlSetVar OrdinaryFileList
"/foundation/images/ /foundation/dl/"
      </Location>

- Grant

P.S. I'm getting 2-3 copies of some messages on this
list, and they seem to be written to me with a CC to
the list.  Is this configurable?  It is difficult to
reply properly this way.


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
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


Re: startup.pl confusion

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2004-06-28 at 16:58, Grant wrote:
> Since the former still doesn't work, I don't think the
> module is loading properly.  I think where I'm stuck
> is the startup.pl file that is supposed to tell the
> system where the Interchange::Link.pm file is.

What makes you think this?  Do you have error messages?  You're not
giving us much to go on.  Have you asked the Interchange developers who
wrote the module about this?

> use lib qw(/usr/lib/perl5/site_perl/5.8.2);1; 
> 
> which seems kind of redundant to me

To me too.  I doubt that is accomplishing anything.

- Perrin


-- 
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