Re: more apache/perl problems, "premature end of script"
i downloaded cgi-lib.pl and placed it in the same directory as my
script. (from cgi-lib.berkeley.edu) it runs fine on the cmdline (both
my box and my university's server)
the error i get in /var/log/apache/error.log is (without the time
stamp):
Premature end of script headers: /home/herb/public_html/init/login.pl
what changes have to be made to a stock apache config on potato for
cgi/perl to work in the user public_html directories?
the changes i've made so far:
1) in access.conf (adding ExecCGI to the Options directive in the
DirectoryMatch directive for the public_html directories)
2) in srm.conf (adding AddHandler cgi-script .pl .cgi)
## my script works in /usr/lib/cgi-bin/ but not in the public_html
directories. i've tried copying the Directory directive for
/usr/lib/cgi-bin word for word to the public_html directive w/ no
effect.
also i've tried this even without cgi-lib.pl, without any difference
on my box (while it works on the university server). here's another
"simple" script that i tried:
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print <<EOF;
<html><body>
hi
</body></html>
EOF
thanks for everyone's help so far. i'm gonna get this to
work...somehow. =)
herbert
On Sun, Nov 26, 2000 at 10:34:12PM -0800, brian moore wrote:
> On Mon, Nov 27, 2000 at 12:18:29AM -0600, Herbert Ho wrote:
> > i posted before w/ 400 forbidden problems. i fixed that, but i still
> > can't get a script to run.
> >
> > i now get:
> >
> > Premature end of script headers: /home/herb/public_html/init/login.pl
> >
> > i'm pretty sure it's not my script since it works on another webserver
> > that my university runs (and i can't find their conf files to
> > compare).
>
> Don't be so sure...
>
> > #!/usr/bin/perl -w
> > require "cgi-lib.pl";
>
> Do you have cgi-lib.pl installed? It's very old and icky.
>
> Look at /var/log/apache/error.log for the errors.
Reply to: