in reply to Re: CGI.pm on AIX 7.2
in thread CGI.pm on AIX 7.2

Hi,

I'm having the following error on apache log when i tried to run the command use CGI on my .cgi script:

####Script .cgi ##### #!/usr/bin/perl use CGI; use lib qw(../cgi-lib); use POSIX qw(strftime); use siteconfig; use parseFile; use libUtil; use strict; ########
###Log Apache [Tue Aug 1 12:39:01 2023] [notice] Apache/1.3.9 (Unix) configured -- +resuming normal operations Can't locate object method "new" via package "CGI" (perhaps you forgot + to load "CGI"?) at /usr/opt/perl5/lib/site_perl/5.28.1/CGI.pm line 7 +. Compilation failed in require at /ieweb/webmon61/cgi-bin/procStatus.cg +i line 3. BEGIN failed--compilation aborted at /ieweb/webmon61/cgi-bin/procStatu +s.cgi line 3
Thank you

Replies are listed 'Best First'.
Re^3: CGI.pm on AIX 7.2
by haj (Vicar) on Aug 01, 2023 at 19:36 UTC

    This looks like a broken, or at least inconsistent installation.

    Examine the file /usr/opt/perl5/lib/site_perl/5.28.1/CGI.pm: Your code seems to assume that this is the library CGI, but this library definitely does not call CGI->new.

    Perhaps you can track down where this CGI.pm comes from, and how /usr/opt/perl5/lib/site_perl/5.28.1/ ended up in your @INC directory. Or you could try installing CGI.pm with the package manager of your distribution, or from CPAN, and make sure that this version is used instead of your weird one.

    Also, cgi-lib seems to be something from a very distant past.... where did that script come from? Perl 4?

Re^3: CGI.pm on AIX 7.2
by ikegami (Patriarch) on Aug 04, 2023 at 00:58 UTC

    Something's really wrong with /usr/opt/perl5/lib/site_perl/5.28.1/CGI.pm.