httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nelson Goforth <ngofo...@earthnet.net>
Subject Re: [users@httpd] CGI problem
Date Fri, 07 Feb 2003 22:29:47 GMT
My first thought is to make sure that your 'shebang' line is correct.

If that's too cryptic, it's the first line of your script, which should 
be like "#!/usr/bin/perl" which tells the program where perl is.  A 
program without the line (or with it incorrect) will run from the 
command line but not in a browser.

Nelson

On Friday, February 7, 2003, at 02:17  PM, Bob Bomar wrote:

> I am running Apache 1.3.27 on a FreeBSD 4.7 Server. When I go to=20
> /cgi-bin/ from the web, I get a 500 error.  When I run the script
> from the command line, it works fine, with the header and all.
> I checked my logs and I see this:
>
> [Thu Feb  6 21:02:07 2003] [error] [client 192.168.1.13] Premature end 
> of s=
> cript headers: /dir/to/script/cvsweb.cgi
> [Thu Feb  6 21:02:43 2003] [error] [client 192.168.1.13] Premature end 
> of s=
> cript headers: /dir/to/script/cvsweb.cgi
> [Thu Feb  6 21:02:45 2003] [error] [client 192.168.1.13] Premature end 
> of s=
> cript headers: /dir/to/script/cvsweb.cgi
>
> here is the relevent portion of the httpd.conf:
>
> <VirtualHost *>
> ServerAdmin bob@bomar.us
> DocumentRoot /usr/local/www/bob
> ServerName bob.bomar.us
> ErrorLog /var/log/bob-error
> CustomLog /var/log/bob-custom common
> ScriptAlias /cgi-bin/ "/usr/local/www/bob/cgi-bin/"
> #AddHandler cgi-script .cgi
> #AddHandler cgi-script .pl
> </VirtualHost>
>
> -- 
> /----------------------------------------------------------------\
> | Bob Bomar 	bulldog@fxp.org 	http://www.bomar.us/~bob |
> |================================================================|
> | FreeBSD: The Power to Serve.		http://www.freeBSD.org   |
> \----------------------------------------------------------------/
> <mime-attachment>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message