[plug] Apache/Perl

Colin Muller colin at twobluedots.com.au
Sun Feb 10 17:58:26 WST 2002


> > Depending on how complex the script is you might be able to fix it
> > simply by adding the line 'print "Content-Type: text/html\n\n";' near
> > the top of it...
> yes, the script has this line

Things to check (although some would, I'd have thought, given
different errors):

- Make the script chmod 755
- Check that the shebang line actually points to your perl executable,
  i.e. if it says #!/usr/bin/perl make sure perl actually lives in
  /usr/bin
- Create a bog-simple script like below,make it chmod 755, and drop it
  into the directory where your other script lives. Then see what
  happens when you run it:

#!/usr/bin/perl -w

warn "FROM CGI SCRIPT: Printing Got there line\n";
print "Content-type: text/plain\n\n";
print "Got here!"
# END

Untested, but that should drop this line into your Apache error log:
FROM CGI SCRIPT: Printing Got there line

... and print this line to your browser:
Got here!

If it does these things, then the problem is with your other Perl
script, not with your Apache config. If it doesn't, then the problem
is probably with the config.

Colin



More information about the plug mailing list