Re: Problems with Apache 2.0, mod_perl2 and perl



"Eric R. Meyers" <ermeyers@xxxxxxxxxxxx> wrote:

3. When I try to run a simple CGI.pm program under Apache, with the
static
perl, the perl can't find CGI.pm in the @INC paths. Of course, the
script works just fine from the command line.

a) The @INC is correct as shown in the error_log, and CGI.pm
didn't
relocate.

Anybody got a clue?

Is perl allowed to access the CGI.pm file?

Try a simple CGI script that does something like:

print "Content-type: text/plain\n\n";

unless ( open my $fh, "/path/to/CGI.pm" ) {

print "Can't open CGI.pm for reading: $!\n";
exit;
}

print "Could open CGI.pm for reading\n";

I guess you'll get the Can't one.

--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
.



Relevant Pages

  • Obtaining complete Unix command line that evoked script as string
    ... If there is a more appropriate list for this, let me know; the other perl lists I've seen seem to specialised for this. ... Note this is not just the arguments of the call to the script, but everything including pipes and redirects, etc., e.g. ... Ideally the perl interpreter would grab the complete command line as its evoked and I'd access this via a variable. ...
    (perl.beginners)
  • Re: Displaying a users group memberships
    ... The user's username is passed to the script via the command line and captured with ARGV. ... I want to determine the group memberships (much like executing `groups` from the command line) and run those through a loop for processing. ... I'm very new to Perl so maybe I'm just looking for the wrong terms or something. ... The format of the command is simple: `test.pl username`, where username is a real username on the system in question. ...
    (perl.beginners)
  • Re: "register" (in perl scripts)
    ... scripted gimp. ... This is a Perl problem, not a GIMP problem so you would probably ... it looks to me like you're trying to execute a command ... By the way, your script doesn't appear to use any CGI, etc. - at ...
    (comp.graphics.apps.gimp)
  • Re: Linux
    ... You almost certainly have Perl already installed. ... But the actual command line interpreter should be the same between them. ... put the shebang line as the first line of the script. ... You can then execute the program ...
    (perl.beginners)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)