| Baldoni 2006-03-18, 3:55 am |
| If it matters to anyone:
Baldoni wrote:
>
> Hello, I'm using OpenBSD 3.8 with apache 1.3.29, and I've got printenv
> to work properly in cgi-bin. The problem is with my first simple form:
The critical line in the error_log was:
Can't locate CGI.pm in @INC (@INC contains:
/usr/libdata/perl5/i386-openbsd/5.8.6
followed by a bunch more directory paths.
To determine that CGI.pm was properly accessable:
#!/usr/bin/perl
open(FILE, '</usr/libdata/perl5/CGI.pm')
or die "Cannot read CGI.pm: $!";
Upon closer scrutiny of error logs, having fixed the occasional
semi-colon problem, and having found an obscure entry in a mail list, it
was determined that this was the problem: httpd is chrooted in OpenBSD
Doing:
$ sudo apachectl stop
$ sudo httpd -u
allowed the script to then run properly in apache (and not just at the
comman prompt (thanks to Paul Lalli). Editing rc.conf, it was
neccessary to change:
httpd_flags=""
to
httpd_flags="-u"
and the change should be permanent.
This also cleared up a "File does not exist: /htdocs/favicon.ico" message.
John
|