Loading ...
Sorry, an error occurred while loading the content.

mod_perl not able to run some pl files.

Expand Messages
  • Bheema Rao Merugu, BSC, Ambattur, Chennai
    Hi, I am getting the below error message in the error_log file. but I had the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3 it s working in the other
    Message 1 of 14 , May 27, 2004
    • 0 Attachment
      Hi,
       
       
      I am getting the below error message in the error_log file. but I had the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3
      it's working in the other box where i have installed the perl in /usr/local path there are noproblems if i compiled the perl in default installation path and running.
      but i am getting the problem when i compiled in a different location like /usr/local/apache.
       
      [Thu May 27 18:38:43 2004] [error] Can't locate CGI.pm in @INC (@INC contains: /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi /usr/local/apache/lib/perl5/5.8.3 /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi /usr/local/apache/lib/perl5/site_perl/5.8.3 /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi /usr/local/apache/lib/perl5/5.8.3 /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi /usr/local/apache/lib/perl5/site_perl/5.8.3 /usr/local/apache/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /export/home/perl/test.pl line 10.
      BEGIN failed--compilation aborted at /export/home/perl/test.pl line 10.
       
      Thanks,
      Bheema

    • Brian Reichert
      ... When you say you had CGI.pm in that path, do you mean that you used that perl installation to make/install the module? Or did you merely copy it in? If
      Message 2 of 14 , May 27, 2004
      • 0 Attachment
        On Thu, May 27, 2004 at 07:45:49PM +0530, Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
        > Hi,
        >
        >
        > I am getting the below error message in the error_log file. but I had
        > the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3

        When you say you 'had' CGI.pm in that path, do you mean that you
        used that perl installation to make/install the module?

        Or did you merely copy it in? If the latter, make sure that you
        have permissions on the file set properly.

        > Thanks,
        > Bheema

        --
        Brian Reichert <reichert@...>
        37 Crystal Ave. #303 Daytime number: (603) 434-6842
        Derry NH 03038-1713 USA BSD admin/developer at large

        --
        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
      • Bheema Rao Merugu, BSC, Ambattur, Chennai
        Hi, thank you for your resposne Brian, Yes, I used the perl installed in that path. I have installed the perl with make install and using the same perl. I have
        Message 3 of 14 , May 27, 2004
        • 0 Attachment
          Hi,

          thank you for your resposne Brian,
          Yes, I used the perl installed in that path. I have installed the perl
          with make install and using the same perl.
          I have not copied CGI.pm just like that in to the path. Its came with
          the installation only.

          Thnaks,
          Bheema


          -----Original Message-----
          From: Brian Reichert [mailto:reichert@...]
          Sent: Thursday, May 27, 2004 10:01 PM
          To: Bheema Rao Merugu, BSC, Ambattur, Chennai
          Cc: modperl@...; Stas Bekman
          Subject: Re: mod_perl not able to run some pl files.


          On Thu, May 27, 2004 at 07:45:49PM +0530, Bheema Rao Merugu, BSC,
          Ambattur, Chennai wrote:
          > Hi,
          >
          >
          > I am getting the below error message in the error_log file. but I had
          > the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3

          When you say you 'had' CGI.pm in that path, do you mean that you
          used that perl installation to make/install the module?

          Or did you merely copy it in? If the latter, make sure that you
          have permissions on the file set properly.

          > Thanks,
          > Bheema

          --
          Brian Reichert <reichert@...>
          37 Crystal Ave. #303 Daytime number: (603) 434-6842
          Derry NH 03038-1713 USA BSD admin/developer at large

          --
          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
        • Bheema Rao Merugu, BSC, Ambattur, Chennai
          Hi, Please find the CGI.pm version installed in my system # perl -MCGI -e print CGI.pm version $CGI::VERSION n ; CGI.pm version 3.01 even though its giving
          Message 4 of 14 , May 27, 2004
          • 0 Attachment
            Hi,


            Please find the CGI.pm version installed in my system

            # perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'
            CGI.pm version 3.01
            even though its giving the error I think there is some configuration
            issue with apache and mod_perl.

            [Thu May 27 18:38:43 2004] [error] Can't locate CGI.pm in @INC (@INC
            contains: /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
            /usr/local/apache/lib/perl5/5.8.3
            /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
            /usr/local/apache/lib/perl5/site_perl/5.8.3
            /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
            /usr/local/apache/lib/perl5/5.8.3
            /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
            /usr/local/apache/lib/perl5/site_perl/5.8.3
            /usr/local/apache/lib/perl5/site_perl . /usr/local/apache/
            /usr/local/apache/lib/perl) at /export/home/perl/test.pl line 10.
            BEGIN failed--compilation aborted at /export/home/perl/test.pl line 10.


            Thanks,
            Bheema.

            -----Original Message-----
            From: Brian Reichert [mailto:reichert@...]
            Sent: Thursday, May 27, 2004 10:01 PM
            To: Bheema Rao Merugu, BSC, Ambattur, Chennai
            Cc: modperl@...; Stas Bekman
            Subject: Re: mod_perl not able to run some pl files.


            On Thu, May 27, 2004 at 07:45:49PM +0530, Bheema Rao Merugu, BSC,
            Ambattur, Chennai wrote:
            > Hi,
            >
            >
            > I am getting the below error message in the error_log file. but I had
            > the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3

            When you say you 'had' CGI.pm in that path, do you mean that you
            used that perl installation to make/install the module?

            Or did you merely copy it in? If the latter, make sure that you
            have permissions on the file set properly.

            > Thanks,
            > Bheema

            --
            Brian Reichert <reichert@...>
            37 Crystal Ave. #303 Daytime number: (603) 434-6842
            Derry NH 03038-1713 USA BSD admin/developer at large

            --
            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
          • Tom Schindl
            well is the perl really executing your perl or the one that comes with the system? # which perl If you don t have uninstalled the default perl your command
            Message 5 of 14 , May 28, 2004
            • 0 Attachment
              well is the "perl" really executing your perl or the one that comes with
              the system?

              # which perl

              If you don't have uninstalled the default perl your command will execute
              the system perl because its located into /usr/bin/perl. Where's your
              personal built perl installed?

              # perl -V
              will tell you the include-paths of your perl installation. I think
              you've messed up something.

              Tom

              Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
              > Hi,
              >
              >
              > Please find the CGI.pm version installed in my system
              >
              > # perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'
              > CGI.pm version 3.01
              > even though its giving the error I think there is some configuration
              > issue with apache and mod_perl.
              >
              > [Thu May 27 18:38:43 2004] [error] Can't locate CGI.pm in @INC (@INC
              > contains: /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
              > /usr/local/apache/lib/perl5/5.8.3
              > /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
              > /usr/local/apache/lib/perl5/site_perl/5.8.3
              > /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
              > /usr/local/apache/lib/perl5/5.8.3
              > /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
              > /usr/local/apache/lib/perl5/site_perl/5.8.3
              > /usr/local/apache/lib/perl5/site_perl . /usr/local/apache/
              > /usr/local/apache/lib/perl) at /export/home/perl/test.pl line 10.
              > BEGIN failed--compilation aborted at /export/home/perl/test.pl line 10.
              >
              >
              > Thanks,
              > Bheema.
              >
              > -----Original Message-----
              > From: Brian Reichert [mailto:reichert@...]
              > Sent: Thursday, May 27, 2004 10:01 PM
              > To: Bheema Rao Merugu, BSC, Ambattur, Chennai
              > Cc: modperl@...; Stas Bekman
              > Subject: Re: mod_perl not able to run some pl files.
              >
              >
              > On Thu, May 27, 2004 at 07:45:49PM +0530, Bheema Rao Merugu, BSC,
              > Ambattur, Chennai wrote:
              >
              >>Hi,
              >>
              >>
              >>I am getting the below error message in the error_log file. but I had
              >>the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3
              >
              >
              > When you say you 'had' CGI.pm in that path, do you mean that you
              > used that perl installation to make/install the module?
              >
              > Or did you merely copy it in? If the latter, make sure that you
              > have permissions on the file set properly.
              >
              >
              >>Thanks,
              >>Bheema
              >
              >


              --
              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
            • Bheema Rao Merugu, BSC, Ambattur, Chennai
              Hi Tom, Thank you for your help. I am not using the perl that came with the system. I compiled the source code from scratch and using that. I have not
              Message 6 of 14 , May 28, 2004
              • 0 Attachment
                Hi Tom,

                Thank you for your help.

                I am not using the perl that came with the system. I compiled the source
                code from scratch and using that.
                I have not uninstalled the perl that came with the system, I compiled
                the perl 5.8.3 in other path (/usr/local/apache)
                and used that perl for compiling and building the Apache and mod_perl.
                perl version is 5.8.3.
                Please find the below outputs from my system.
                I am able to run simple .pl files.
                like
                print "testing the perl script";

                but not able to run the complex .pl files which are using some modules.

                Thanks,
                Bheema.

                # which perl
                /usr/local/apache/bin/perl

                # perl -V
                Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
                Platform:
                osname=aix, osvers=5.2.0.0, archname=aix-thread-multi
                uname='aix clibm023 2 5 00514c2a4c00 '
                config_args='-Dcc=gcc'
                hint=recommended, useposix=true, d_sigaction=define
                usethreads=define use5005threads=undef useithreads=define
                usemultiplicity=define
                useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
                use64bitint=undef use64bitall=undef uselongdouble=undef
                usemymalloc=n, bincompat5005=undef
                Compiler:
                cc='gcc', ccflags ='-D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE
                -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
                -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILES',
                optimize='-O',
                cppflags='-D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE
                -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
                -fno-strict-aliasing -I/usr/local/include'
                ccversion='', gccversion='3.3.2', gccosandvers='aix5.2.0.0'
                intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
                d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
                ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
                lseeksize=8
                alignbytes=8, prototype=define
                Linker and Libraries:
                ld='gcc', ldflags =' -Wl,-brtl -L/usr/local/lib -Wl,-b32'
                libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
                libs=-lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lpthreads -lc_r -lbsd
                perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc_r -lbsd
                libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
                gnulibc_version=''
                Dynamic Linking:
                dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Xlinker
                -bE:/usr/local/apache/lib/perl5/5.8.3/aix-thread-multi/CORE/perl.exp'
                cccdlflags=' ', lddlflags=' -Wl,-bhalt:4 -Wl,-bM:SRE
                -Wl,-bI:$(PERL_INC)/perl.exp -Wl,-bE:$(BASEEXT).exp -Wl,-bnoentry
                -lpthreads -lc_r -L/usr/local/lib'


                Characteristics of this binary (from libperl):
                Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
                PERL_IMPLICIT_CONTEXT
                Built under aix
                Compiled at May 27 2004 16:35:10
                %ENV:

                PERL5LIB="/usr/local/apache/lib/perl5/5.8.3:/usr/local/apache/lib/perl5/
                site_perl/5.8.3"
                @INC:
                /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
                /usr/local/apache/lib/perl5/5.8.3
                /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
                /usr/local/apache/lib/perl5/site_perl/5.8.3
                /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
                /usr/local/apache/lib/perl5/5.8.3
                /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
                /usr/local/apache/lib/perl5/site_perl/5.8.3
                /usr/local/apache/lib/perl5/site_perl
                .
                #

                -----Original Message-----
                From: Tom Schindl [mailto:tomAtLinux@...]
                Sent: Friday, May 28, 2004 1:07 PM
                To: Bheema Rao Merugu, BSC, Ambattur, Chennai; mod_perl
                Subject: Re: mod_perl not able to run some pl files.


                well is the "perl" really executing your perl or the one that comes with

                the system?

                # which perl

                If you don't have uninstalled the default perl your command will execute

                the system perl because its located into /usr/bin/perl. Where's your
                personal built perl installed?

                # perl -V
                will tell you the include-paths of your perl installation. I think
                you've messed up something.

                Tom

                Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
                > Hi,
                >
                >
                > Please find the CGI.pm version installed in my system
                >
                > # perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'
                > CGI.pm version 3.01
                > even though its giving the error I think there is some configuration
                > issue with apache and mod_perl.
                >
                > [Thu May 27 18:38:43 2004] [error] Can't locate CGI.pm in @INC (@INC
                > contains: /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
                > /usr/local/apache/lib/perl5/5.8.3
                > /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
                > /usr/local/apache/lib/perl5/site_perl/5.8.3
                > /usr/local/apache/lib/perl5/5.8.3/aix-thread-multi
                > /usr/local/apache/lib/perl5/5.8.3
                > /usr/local/apache/lib/perl5/site_perl/5.8.3/aix-thread-multi
                > /usr/local/apache/lib/perl5/site_perl/5.8.3
                > /usr/local/apache/lib/perl5/site_perl . /usr/local/apache/
                > /usr/local/apache/lib/perl) at /export/home/perl/test.pl line 10.
                > BEGIN failed--compilation aborted at /export/home/perl/test.pl line
                10.
                >
                >
                > Thanks,
                > Bheema.
                >
                > -----Original Message-----
                > From: Brian Reichert [mailto:reichert@...]
                > Sent: Thursday, May 27, 2004 10:01 PM
                > To: Bheema Rao Merugu, BSC, Ambattur, Chennai
                > Cc: modperl@...; Stas Bekman
                > Subject: Re: mod_perl not able to run some pl files.
                >
                >
                > On Thu, May 27, 2004 at 07:45:49PM +0530, Bheema Rao Merugu, BSC,
                > Ambattur, Chennai wrote:
                >
                >>Hi,
                >>
                >>
                >>I am getting the below error message in the error_log file. but I had
                >>the CGI.pm in the path /usr/local/apache/lib/perl5/5.8.3
                >
                >
                > When you say you 'had' CGI.pm in that path, do you mean that you
                > used that perl installation to make/install the module?
                >
                > Or did you merely copy it in? If the latter, make sure that you
                > have permissions on the file set properly.
                >
                >
                >>Thanks,
                >>Bheema
                >
                >

                --
                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
              • Perrin Harkins
                On Fri, 2004-05-28 at 05:07, Bheema Rao Merugu, BSC, Ambattur, Chennai ... It looks to me like you have a file permissions problem. Running from mod_perl you
                Message 7 of 14 , May 28, 2004
                • 0 Attachment
                  On Fri, 2004-05-28 at 05:07, Bheema Rao Merugu, BSC, Ambattur, Chennai
                  wrote:
                  > I am not using the perl that came with the system. I compiled the source
                  > code from scratch and using that.

                  It looks to me like you have a file permissions problem. Running from
                  mod_perl you are probably operating as user "nobody" who has different
                  permissions from your normal user login. Try su-ing to nobody and
                  viewing the CGI.pm file to check this.

                  - 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
                • Brian Reichert
                  ... Ok, I think what people meant to suggest was this: /usr/local/apache/bin/perl -MCGI -e print CGI.pm version $CGI::VERSION n ; That will tell you if
                  Message 8 of 14 , May 28, 2004
                  • 0 Attachment
                    On Fri, May 28, 2004 at 02:37:39PM +0530, Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
                    > Hi Tom,
                    >
                    > Thank you for your help.
                    >
                    > I am not using the perl that came with the system. I compiled the source
                    > code from scratch and using that.

                    Ok, I think what people meant to suggest was this:

                    /usr/local/apache/bin/perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'

                    That will tell you if _that_ installation of perl knows about a CGI module.

                    If it's not there, then you'll need to really install CGI.pm there:

                    # /usr/local/apache/bin/perl Makefile.PL
                    # make && make test && make install

                    If is _does_ see a CGI module installed, but your mod_perl doesn't,
                    then we need to do more research.

                    For example, is there a file called CGI.pm somewhere under that
                    perl tree?

                    find /usr/local/apache/lib -name CGI.pm -ls

                    What are the permissions on it? If you installed as root, but had
                    a restrictive umask, it may not be world-readable, which would
                    thwart the apache process from reading it.

                    --
                    Brian Reichert <reichert@...>
                    37 Crystal Ave. #303 Daytime number: (603) 434-6842
                    Derry NH 03038-1713 USA BSD admin/developer at large

                    --
                    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
                  • Bheema Rao Merugu, BSC, Ambattur, Chennai
                    Hi, Thanks for the help. if I try with su-ing to user nobody its showing me the CGI.pm version as $ perl -MCGI -e print CGI.pm version $CGI::VERSION n ;
                    Message 9 of 14 , May 30, 2004
                    • 0 Attachment
                      Hi,

                      Thanks for the help.

                      if I try with su-ing to user nobody its showing me the CGI.pm version
                      as
                      $ perl -MCGI -e 'print "CGI.pm version $CGI::VERSION\n";'
                      CGI.pm version 2.81
                      $ which perl
                      /usr/bin/perl
                      its taking the defualt perl which installed by the OS. how to change
                      this I have compiled and installed the perl
                      in /usr/local/apache/bin if I logged in as root its showing me the
                      # which perl
                      /usr/local/apache/bin/perl
                      how to run the perl, apache and mod_perl under root only rather than
                      'nobody'.


                      Thanks,
                      Bheema.


                      -----Original Message-----
                      From: Perrin Harkins [mailto:perrin@...]
                      Sent: Friday, May 28, 2004 11:05 PM
                      To: Bheema Rao Merugu, BSC, Ambattur, Chennai
                      Cc: Tom Schindl; mod_perl
                      Subject: RE: mod_perl not able to run some pl files.


                      On Fri, 2004-05-28 at 05:07, Bheema Rao Merugu, BSC, Ambattur, Chennai
                      wrote:
                      > I am not using the perl that came with the system. I compiled the
                      source
                      > code from scratch and using that.

                      It looks to me like you have a file permissions problem. Running from
                      mod_perl you are probably operating as user "nobody" who has different
                      permissions from your normal user login. Try su-ing to nobody and
                      viewing the CGI.pm file to check this.

                      - 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
                    • Bheema Rao Merugu, BSC, Ambattur, Chennai
                      Hi, I have noticed one thing while running the perl files. in my httpd.conf the user and group names are User nobody Group nobody if I change Group name as
                      Message 10 of 14 , May 31, 2004
                      • 0 Attachment
                        Hi,

                        I have noticed one thing while running the perl files.

                        in my httpd.conf the user and group names are
                        User nobody
                        Group nobody
                        if I change Group name as system
                        User nobody
                        Group system
                        perl files are running fine without any error its giving the problem
                        when i am running with group as 'nobody'

                        Please find the part of the out put underlined while building the
                        mod_perl its taking the group as system.
                        Can you please let me know how to change this group to nobody bz apache
                        is running under group 'nobody'

                        PerlServerApi...............enabled
                        PerlSections................enabled
                        PerlSSI.....................enabled
                        Will run tests as User: 'nobody' Group: 'system'
                        ================================================
                        (cd ../apache_1.3.24 && CC="gcc" CFLAGS=" -D_THREAD_SAFE -D_ALL_SOURCE
                        -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT
                        -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILES" ./configure
                        --activate-module=src/modules/perl/libperl.a --disable-rule=EXPAT)
                        Configuring for Apache, Version 1.3.24
                        + using installation path layout: Apache (config.layout)
                        + activated perl module (modules/perl/libperl.a)
                        Creating Makefile
                        Creating Configuration.apaci in src

                        Thanks,
                        Bheema.


                        -----Original Message-----
                        From: Brian Reichert [mailto:reichert@...]
                        Sent: Friday, May 28, 2004 11:11 PM
                        To: Bheema Rao Merugu, BSC, Ambattur, Chennai
                        Cc: Tom Schindl; mod_perl
                        Subject: Re: mod_perl not able to run some pl files.


                        On Fri, May 28, 2004 at 02:37:39PM +0530, Bheema Rao Merugu, BSC,
                        Ambattur, Chennai wrote:
                        > Hi Tom,
                        >
                        > Thank you for your help.
                        >
                        > I am not using the perl that came with the system. I compiled the
                        source
                        > code from scratch and using that.

                        Ok, I think what people meant to suggest was this:

                        /usr/local/apache/bin/perl -MCGI -e 'print "CGI.pm version
                        $CGI::VERSION\n";'

                        That will tell you if _that_ installation of perl knows about a CGI
                        module.

                        If it's not there, then you'll need to really install CGI.pm there:

                        # /usr/local/apache/bin/perl Makefile.PL
                        # make && make test && make install

                        If is _does_ see a CGI module installed, but your mod_perl doesn't,
                        then we need to do more research.

                        For example, is there a file called CGI.pm somewhere under that
                        perl tree?

                        find /usr/local/apache/lib -name CGI.pm -ls

                        What are the permissions on it? If you installed as root, but had
                        a restrictive umask, it may not be world-readable, which would
                        thwart the apache process from reading it.

                        --
                        Brian Reichert <reichert@...>
                        37 Crystal Ave. #303 Daytime number: (603) 434-6842
                        Derry NH 03038-1713 USA BSD admin/developer at large

                        --
                        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
                      • Brian Reichert
                        ... I m guessing that it s group readable. But we ll never know, if you don t answer the questions I asked. :/ ... -- Brian Reichert
                        Message 11 of 14 , May 31, 2004
                        • 0 Attachment
                          On Mon, May 31, 2004 at 01:19:22PM +0530, Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
                          > Hi,
                          >
                          > I have noticed one thing while running the perl files.
                          >
                          > in my httpd.conf the user and group names are
                          > User nobody
                          > Group nobody
                          > if I change Group name as system
                          > User nobody
                          > Group system
                          > perl files are running fine without any error its giving the problem
                          > when i am running with group as 'nobody'

                          Something I had suggested earlier:

                          > For example, is there a file called CGI.pm somewhere under that
                          > perl tree?
                          >
                          > find /usr/local/apache/lib -name CGI.pm -ls
                          >
                          > What are the permissions on it? If you installed as root, but had
                          > a restrictive umask, it may not be world-readable, which would
                          > thwart the apache process from reading it.

                          I'm guessing that it's group readable. But we'll never know, if
                          you don't answer the questions I asked. :/

                          > Thanks,
                          > Bheema.

                          --
                          Brian Reichert <reichert@...>
                          37 Crystal Ave. #303 Daytime number: (603) 434-6842
                          Derry NH 03038-1713 USA BSD admin/developer at large

                          --
                          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
                        • Bheema Rao Merugu, BSC, Ambattur, Chennai
                          Hi, I am sorry please find the out put that you are asking for. # find /usr/local/apache/lib -name CGI.pm -ls 372763 228 -rwxrwxrwx 1 root system
                          Message 12 of 14 , May 31, 2004
                          • 0 Attachment
                            Hi,

                            I am sorry please find the out put that you are asking for.

                            # find /usr/local/apache/lib -name CGI.pm -ls
                            372763 228 -rwxrwxrwx 1 root system 230097 May 27 16:50
                            /usr/local/apache/lib/perl5/5.8.3/CGI.pm

                            Thanks,
                            Bheema.

                            -----Original Message-----
                            From: Brian Reichert [mailto:reichert@...]
                            Sent: Monday, May 31, 2004 9:52 PM
                            To: Bheema Rao Merugu, BSC, Ambattur, Chennai
                            Cc: Brian Reichert; Tom Schindl; Perrin Harkins; mod_perl
                            Subject: Re: mod_perl not able to run some pl files.


                            On Mon, May 31, 2004 at 01:19:22PM +0530, Bheema Rao Merugu, BSC,
                            Ambattur, Chennai wrote:
                            > Hi,
                            >
                            > I have noticed one thing while running the perl files.
                            >
                            > in my httpd.conf the user and group names are
                            > User nobody
                            > Group nobody
                            > if I change Group name as system
                            > User nobody
                            > Group system
                            > perl files are running fine without any error its giving the
                            problem
                            > when i am running with group as 'nobody'

                            Something I had suggested earlier:

                            > For example, is there a file called CGI.pm somewhere under that
                            > perl tree?
                            >
                            > find /usr/local/apache/lib -name CGI.pm -ls
                            >
                            > What are the permissions on it? If you installed as root, but had
                            > a restrictive umask, it may not be world-readable, which would
                            > thwart the apache process from reading it.

                            I'm guessing that it's group readable. But we'll never know, if
                            you don't answer the questions I asked. :/

                            > Thanks,
                            > Bheema.

                            --
                            Brian Reichert <reichert@...>
                            37 Crystal Ave. #303 Daytime number: (603) 434-6842
                            Derry NH 03038-1713 USA BSD admin/developer at large

                            --
                            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
                          • Brian Reichert
                            ... Egads: a root-owned file that world-writable?! That s _very_ uncool. If, by merely changing the group the web server runs as suddenly make things work, it
                            Message 13 of 14 , Jun 1, 2004
                            • 0 Attachment
                              On Tue, Jun 01, 2004 at 10:24:33AM +0530, Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
                              > Hi,
                              >
                              > I am sorry please find the out put that you are asking for.
                              >
                              > # find /usr/local/apache/lib -name CGI.pm -ls
                              > 372763 228 -rwxrwxrwx 1 root system 230097 May 27 16:50
                              > /usr/local/apache/lib/perl5/5.8.3/CGI.pm

                              Egads: a root-owned file that world-writable?! That's _very_ uncool.

                              If, by merely changing the group the web server runs as suddenly
                              make things work, it still leads me to think that the permissions
                              are off in your Perl tree.

                              Perl does not install modules world-writable; I think that someone
                              changed permissions on this file, after the fact. :/

                              If any component in the path /usr/local/apache/lib/perl5/5.8.3/CGI.pm
                              is not world-readable, or, in the case of a directory, world-executable,
                              then user/group nobody/nobody won't be able to read the file.

                              But this file should certainly not be world-writable.

                              > Thanks,
                              > Bheema.

                              --
                              Brian Reichert <reichert@...>
                              37 Crystal Ave. #303 Daytime number: (603) 434-6842
                              Derry NH 03038-1713 USA BSD admin/developer at large

                              --
                              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
                            • Stas Bekman
                              ... We had to deal with similar problems in Apache-Test. After many rewrites the following code is used to check whether some directory is -rwx by a certain
                              Message 14 of 14 , Jun 1, 2004
                              • 0 Attachment
                                Brian Reichert wrote:
                                > On Tue, Jun 01, 2004 at 10:24:33AM +0530, Bheema Rao Merugu, BSC, Ambattur, Chennai wrote:
                                >
                                >>Hi,
                                >>
                                >> I am sorry please find the out put that you are asking for.
                                >>
                                >> # find /usr/local/apache/lib -name CGI.pm -ls
                                >> 372763 228 -rwxrwxrwx 1 root system 230097 May 27 16:50
                                >>/usr/local/apache/lib/perl5/5.8.3/CGI.pm
                                >
                                >
                                > Egads: a root-owned file that world-writable?! That's _very_ uncool.
                                >
                                > If, by merely changing the group the web server runs as suddenly
                                > make things work, it still leads me to think that the permissions
                                > are off in your Perl tree.
                                >
                                > Perl does not install modules world-writable; I think that someone
                                > changed permissions on this file, after the fact. :/
                                >
                                > If any component in the path /usr/local/apache/lib/perl5/5.8.3/CGI.pm
                                > is not world-readable, or, in the case of a directory, world-executable,
                                > then user/group nobody/nobody won't be able to read the file.
                                >
                                > But this file should certainly not be world-writable.

                                We had to deal with similar problems in Apache-Test. After many rewrites the
                                following code is used to check whether some directory is -rwx by a certain
                                user. You can adjust it to just check for -rx. It emulates the exact thing
                                that happens when Apache spawns child processes and drops root priveledges.

                                Just like Apache, this is run as root, and you need to add $uid and $gid of
                                that user the server is running under. $dir is the dir you want to check;

                                perl -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test($uid,
                                $gid, q[$dir]) }';

                                You can get the two vars from the username:

                                my($uid, $gid) = (getpwnam($user))[2..3]

                                And this is the actual test sub:

                                # this sub is executed from an external process only, since it
                                # "sudo"'s into a uid/gid of choice
                                sub run_root_fs_test {
                                my($uid, $gid, $dir) = @_;

                                # first must change gid and egid ("$gid $gid" for an empty
                                # setgroups() call as explained in perlvar.pod)
                                my $groups = "$gid $gid";
                                $( = $) = $groups;
                                die "failed to change gid to $gid"
                                unless $( eq $groups && $) eq $groups;

                                # only now can change uid and euid
                                $< = $> = $uid+0;
                                die "failed to change uid to $uid" unless $< == $uid && $> == $uid;

                                my $file = catfile $dir, ".apache-test-file-$$-".time.int(rand);
                                eval "END { unlink q[$file] }";

                                # unfortunately we can't run the what seems to be an obvious test:
                                # -r $dir && -w _ && -x _
                                # since not all perl implementations do it right (e.g. sometimes
                                # acls are ignored, at other times setid/gid change is ignored)
                                # therefore we test by trying to attempt to read/write/execute

                                # -w
                                open TEST, ">$file" or die "failed to open $file: $!";

                                # -x
                                -f $file or die "$file cannot be looked up";
                                close TEST;

                                # -r
                                opendir DIR, $dir or die "failed to open dir $dir: $!";
                                defined readdir DIR or die "failed to read dir $dir: $!";
                                close DIR;

                                # all tests passed
                                print "OK";
                                }

                                so you probably want to convert it to a script and do your testing. This could
                                be a good addition to the modperl debug utils toolbox.

                                I'll leave it to you to put all these pieces together.

                                --
                                __________________________________________________________________
                                Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
                                http://stason.org/ mod_perl Guide ---> http://perl.apache.org
                                mailto:stas@... http://use.perl.org http://apacheweek.com
                                http://modperlbook.org http://apache.org http://ticketmaster.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
                              Your message has been successfully submitted and would be delivered to recipients shortly.