Running Mandrake Linux 9. I'd think that the CGI module is part of the default perl build, but apparently not. I am trying to use the CGI module to extract values from a form. My cgi looks like:
$q = new CGI;
$username = $q->param('username');
$password = $q->param('password');
... MORE CODE ...
When I use the form in the test.html file I get a "500 Internal Server Error". The apache error logs just say:
[Thu Mar 20 21:08:42 2003] [error] (2)No such file or directory: exec of /var/www/cgi-bin/admin.cgi
[Thu Mar 20 21:08:42 2003] [error] [client <IP ADDR>] Premature end of script headers: /var/www/cgi-bin/admin.cgi
So, I cant find anything wrong in my script, so I run the script through the console.
$ perl -D admin.cgi
Recompile perl with -DDEBUGGING to use -D switch
Can't locate CGI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-
ad-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5
.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl
.) at admin.cgi line 11.
BEGIN failed--compilation aborted at admin.cgi line 11.
This gives me the impression that I don't have the CGI module (regardless of the fact perl is not compiled corectly for debugging). So I look in </usr/lib/perl5/vendor_per
l/5.8.0> and there is a CGI/ dir, but the dir is empty. So first I go to mirror that has Mandrake RPMs. I get "perl-CGI-2.810-3mdk.noarc
h.rpm" and run it.
# rpm -i perl-CGI-2.810-3mdk.noarch
error: unpacking of archive failed on file
4c: cpio: MD5 sum mismatch
So now I am pretty much clueless, so I try going to www.cpan.org
and downloading "CGI.pm-2.91.tar.gz". So I think maybe this will work so I give is a shot.
# gunzip CGI.pm-2.91.tar.gz
gunzip: CGI.pm-2.91.tar.gz: invalid compressed data--crc error
gunzip: CGI.pm-2.91.tar.gz: invalid compressed data--length error
SOOOO... Is anyone else as baffled as I am? Anyone's insight would be helpful!