You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Willem-Jan Meijer <me...@chello.nl> on 2003/04/18 13:52:57 UTC

[users@httpd] CGI-scripts not working

Hello list,

Recently my hdd from my server died so I bought a new one and had to do a
new installation. I've done an installation with debian testing/unstable and
apache 2.0.44. The _normal_ stuff is served on the internet, but I can't get
cgi-scripts working. I've read the instructions given in the httpd.conf file
and searched the httpd.apache.org site for this, but I can't get it work.
When I want to run a cgi-script via a browser I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, meyer3@chello.nl and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.


----------------------------------------------------------------------------
----

Apache/2.0.44 (Unix) Server at 62.163.158.122 Port 80

The cgi part of the config file:

ScriptAlias /cgi-bin/ "/usr/local/apache2/htdocs/cgi-bin/"

<snip>

<Directory "/usr/local/apache2/htdocs/cgi-bin">
	AllowOverride None
	Options ExecCGI
	Order Allow, Deny
	Allow from all
</Directory>


I think I'm missing something but I'm working with linux and apache since
november 2002, so i'm not very experienced.

Hope you can help me.

Kind regards,

Willem-Jan Meijer,
The Netherlands



---------------------------------------------------------------------
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


Re: [users@httpd] CGI-scripts not working

Posted by BAO RuiXian <ru...@pp.inet.fi>.

Willem-Jan Meijer wrote:

>  
>
>I've looked in the error logfile and it says:
>
>[error] [client 192.168.0.10] Premature end of script headers: admin.cgi
>  
>
Do you have the line which before any other print lines in your admin.cgi:

    print "Context-type: text/html\n\n";

Best

Bao



---------------------------------------------------------------------
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


[users@httpd] SOLVED: [users@httpd] CGI-scripts not working

Posted by Willem-Jan Meijer <me...@chello.nl>.
System schreef op vrijdag 18 april 2003 14:56:

> BAO RuiXian schreef op vrijdag 18 april 2003 14:19:
> 
>> Hello,
>> 
>> Willem-Jan Meijer wrote:
>> 
>>> More information about this error may be available in the server
>>> error log. 
>>> 
>>> 
>>> 
>> You should do like the error message suggested, look at the server
>> error log. 
>> 
>> Best
>> 
>> Bao
> 
> I've looked in the error logfile and it says:
> 
> [error] [client 192.168.0.10] Premature end of script headers:
> admin.cgi 
> 
> Check the shebang line #!/usr/bin/perl or may be some different path.
> check the permissions 755 for .cgi and .pl if not could u paste the
> first few line of your code (admin.cgi) if at all u don't mind!!!  
> 
> Regards,
> Tina.
> 
> 
> 
> ---------------------------------------------------------------------
> 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  

The problem was a syntax error...I downloaded one from the internet and it
was zipped...at the end of the line there was "^M". I removed this and now
it works. Sorry for disturbing.

HTH,

Willem-Jan Meijer

/* My name is Jehovah. I have a special plan to save the universe, but
because of heavenly security reasons I can't tell you what that plan
is. Your's just going to put your faith in me, because I see the
picture and you don't. You know I'm good, because I told you so. If you
don't believe me, I'll throw you on my enemies list and throw you in a
pit where Infernal Revenue Service will audit your taxes for eternity*/

Re: [users@httpd] CGI-scripts not working

Posted by System <sy...@eluminoustechnologies.com>.
BAO RuiXian schreef op vrijdag 18 april 2003 14:19:

> Hello,
>
> Willem-Jan Meijer wrote:
>
>> More information about this error may be available in the server
>> error log.
>>
>>
>>
> You should do like the error message suggested, look at the server
> error log.
>
> Best
>
> Bao

I've looked in the error logfile and it says:

[error] [client 192.168.0.10] Premature end of script headers: admin.cgi

Check the shebang line #!/usr/bin/perl or may be some different path.
check the permissions 755 for .cgi and .pl
if not could u paste the first few line of your code (admin.cgi) if at all u
don't mind!!!

Regards,
Tina.



---------------------------------------------------------------------
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


RE: [users@httpd] CGI-scripts not working

Posted by Willem-Jan Meijer <me...@chello.nl>.
BAO RuiXian schreef op vrijdag 18 april 2003 14:19:

> Hello,
> 
> Willem-Jan Meijer wrote:
> 
>> More information about this error may be available in the server
>> error log. 
>> 
>> 
>> 
> You should do like the error message suggested, look at the server
> error log.
> 
> Best
> 
> Bao

I've looked in the error logfile and it says:

[error] [client 192.168.0.10] Premature end of script headers: admin.cgi

I've read the documentation again and it says is has to do with suexec, but
I don't know how to install or remove it -  I even don't know what I have to
do now.

HTH,

Willem-Jan Meijer
Netherlands

/* My name is Jehovah. I have a special plan to save the universe, but
because of heavenly security reasons I can't tell you what that plan
is. Your's just going to put your faith in me, because I see the
picture and you don't. You know I'm good, because I told you so. If you
don't believe me, I'll throw you on my enemies list and throw you in a
pit where Infernal Revenue Service will audit your taxes for eternity*/

Re: [users@httpd] CGI-scripts not working

Posted by BAO RuiXian <ru...@pp.inet.fi>.
Hello,

Willem-Jan Meijer wrote:

>More information about this error may be available in the server error log.
>
>  
>
You should do like the error message suggested, look at the server error 
log.

Best

Bao



---------------------------------------------------------------------
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