Re: newbie CGI error Premature end of script headers.



In article <64d37126-5b6b-4365-875a-1b67ec9502da@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Myron <delcofiftyfive@xxxxxxxxx> wrote:
In my spare time I have just started a home OpenBSD 4.6, running
Apache and want to use Perl.
Apache is working, Perl is working from the command line, but CGI
doesn't.

I am a newbie, a little UNIX sysadmin experience, but this little
webserver hobby has me stumped.

I have installed OpenBSD4.6 clean on an old i386 machine.
I have turned on ftp, samba, and Apache, and they work.
EXCEPT CGI. First I went to httpd.Apache.org/docs/2.0/howto/cgi.html
and incorrectly did everything that page said to permit CGI. And it
didn't work. So understanding a little more about the httpd.conf, now
my approach is to allow the ScriptAlias to permit /usr/www/cgi-bin/ to
be the cgi executable directory. Last night I got a clean httpd.conf
from the tarball and as I understand it, it looks like it should work
the way it is 'right out of the box'?

By default, httpd is chroot'ed. For cgi scripts to work, you must have
everything you need living under /var/www.

To check whether that's the case, try out non-chroot'ed httpd, that is
start it with -u.
.



Relevant Pages

  • Re: [Way OT] perl, CGI, and sendmail
    ... >> Been experimenting with CGI, using perl. ... This is the standard format that came with the Debian install of apache ...
    (Debian-User)
  • Re: failed: ERROR OCIEnvNlsCreate. Check (everything)
    ... Perl CGI on this server for years. ... Most likely are DBD::Oracle, Oracle client libraries, environment variables used by Oracle, and filesystem permission issues. ... Either put the user running Apache into the relevant group, or change the filesystem permissions. ...
    (perl.dbi.users)
  • Re: newbie CGI error Premature end of script headers.
    ... Apache is working, Perl is working from the command line, but CGI ... apache program to install something can't create devices and install and ...
    (comp.unix.bsd.openbsd.misc)
  • Re: dynamic lib ignored even after "found" in "install_driver(Oracle) failed: Cant load..." cgi prob
    ... the solution i found is this: i moved the directory containing libclntsh.so under /usr/lib, which is a location that apache seems to trust, as opposed to where i had originally placed this directory. ... so, if i knew then what i know now, here are the steps _I_ would use were i to install the oracle instantclient such that the DBD::Oracle module would work when used in an apache 2.0 CGI: ... i also could run it this way by placing tnsnames.ora in my home directory as .tnsnames.ora, but this location will do me no good when i want apache to run the script as a cgi. ... am i missing some sort of configuration detail regarding apache and permissions granted a cgi? ...
    (perl.dbi.users)
  • Re: Help getting Perl/CGI running on OS X localhost with apache
    ... > I am trying to learn about perl and cgi. ... I have apache and php running ... Use a cgi-bin dir *outside* your document root. ...
    (comp.lang.perl.misc)