Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Oct 1996 18:55:39 +0200
From:      Nadav Eiron <nadav@barcode.co.il>
Cc:        questions@freebsd.org
Subject:   Apache won't do CGI
Message-ID:  <326A598B.41C67EA6@barcode.co.il>

next in thread | raw e-mail | index | archive | help
Hi!

I'm running Apache 1.1.1 on two FreeBSD 2.1.5 Release mahines. One works
Just Fine, the other will not run any CGI scripts.
When I attempt to run a CGI script I get:

/usr/local/apache/cgi-bin/test-cgi: Can't open
/usr/local/apache/cgi-bin/test-cgi
[Sun Oct 20 17:51:18 1996] access to /usr/local/apache/cgi-bin/test-cgi
failed for scully.barcode.co.il, reason: Premature end of script headers

Working through mod_cgi.c with gdb I got to the following (possibly
incorrect :->) conclusions:
1. The child process that should run the script gets spawned O.K. The
exec that should execute the script works too (at least it doesn't
return).
2. The fgets that the server does to get the output on the script's
stdout returnd NULL.
3. Even if I put printf's in the code before the exec, giving output on
stdout beforethe script gets exec'ed, the parent doesn't seem to read
it.

I'm sure it's something trivial (I have a similar configuration working)
just don't know what it is. It looks as if the pipe between the parent
and child is broken (but the pipe() call does not return any errors).

Thanks for any advice anyone might have for me.
Nadav

P.S.
Already tried reinstalling, copying the conf directory from the working
machine, fiddling with security settings etc., to no avail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?326A598B.41C67EA6>