httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Fish" <seada...@cox.net>
Subject RE: Perl CGI
Date Thu, 27 Jun 2002 07:03:20 GMT
You may have multiple copies of perl installed and your script is using a
different one.
What is the first line of the cgi? It should be something like:

#!/usr/local/bin/perl

and your script will try to use that version.

Check the last few lines of 'perl -V' via the command line to make sure your
@INC matches the @INC in the error.

Determine the path to perl you are using on the command line by 'which perl'
(Common installation directories are /usr/bin/perl and /usr/local/bin/perl)

Also have a look at your PATH variable. If you DO have multiple versions of
perl running around and don't explicitly tell it which one to use in a
script, it will use which ever one it finds first in the path.  (For example
if you have versions in /opt/sfw/bin and /usr/local/bin, but /usr/local/bin
shows up in the path before /opt/sfw/bin, then the version in /usr/local/bin
will get used)

-Dan


-----Original Message-----
From: Robert Davis [mailto:sac61689@skymail.csus.edu]
Sent: Wednesday, June 26, 2002 2:52 PM
To: Apache Users
Subject: Perl CGI


I cannot get PERL cgi scripts to work with apache. I know that PERL
is setup correctly. I keep getting errors such as...

Can't locate CGI.pm in @INC (@INC contains:
/opt/perl5/lib/5.6.1/PA-RISC2.0 /opt
/perl5/lib/5.6.1 /opt/perl5/lib/site_perl/5.6.1/PA-RISC2.0
/opt/perl5/lib/site_perl/5.6.1 /opt/perl5/lib/site_perl

I checked and this file (CGI.pm) exists in that location (it is
owned by root though)...any ideas??



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message