You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Hendrik Daldrup <He...@t-online.de> on 2002/01/23 14:08:20 UTC

cgi-problems

hi there,

i still have some cgi-problems.
everything is working fine, but some scripts produce the following error:

"Premature end of script headers: /......./cgi-bin/script_name"

problems is i have no clue about perl/cgi stuff, so that i dont even 
know what this error means,
or where it could be related to.

thx,

hendrik




---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: cgi-problems

Posted by Hendrik Daldrup <He...@t-online.de>.
thx a lot,

perl is in proper dir, chmod is ok too,
but the script really has an error.
i just updated my server, and checked the old backups, but there is the 
same error in that file and it worked back then.

i read s.th. that it might be SUEXEC related...
what do i need SUEXEC for (cause i just checked and its installed, but 
wasnt installed before)

thx

hendrik

Tom Ray wrote:

> It generally means the script isn't being executed properly. Make sure 
> that your path to perl is set properly, either /usr/bin/perl or 
> /usr/local/bin/perl  If you don't know your path, and you can telnet 
> in type whereis perl and that will show you the path. Also make sure 
> your script mods are set to 755.
>
> If you still get that error, and again assuming you have shell access, 
> just go into your CGI-bin and type ./script_name and it will either 
> kick back proper input or tell you where the error is (ie bad 
> character in line 28, etc)
>
> Hendrik Daldrup wrote:
>
>> hi there,
>>
>> i still have some cgi-problems.
>> everything is working fine, but some scripts produce the following 
>> error:
>>
>> "Premature end of script headers: /......./cgi-bin/script_name"
>>
>> problems is i have no clue about perl/cgi stuff, so that i dont even 
>> know what this error means,
>> or where it could be related to.
>>
>> thx,
>>
>> hendrik
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: cgi-problems

Posted by Tom Ray <to...@blazestudios.com>.
It generally means the script isn't being executed properly. Make sure 
that your path to perl is set properly, either /usr/bin/perl or 
/usr/local/bin/perl  If you don't know your path, and you can telnet in 
type whereis perl and that will show you the path. Also make sure your 
script mods are set to 755.

If you still get that error, and again assuming you have shell access, 
just go into your CGI-bin and type ./script_name and it will either kick 
back proper input or tell you where the error is (ie bad character in 
line 28, etc)

Hendrik Daldrup wrote:

> hi there,
>
> i still have some cgi-problems.
> everything is working fine, but some scripts produce the following error:
>
> "Premature end of script headers: /......./cgi-bin/script_name"
>
> problems is i have no clue about perl/cgi stuff, so that i dont even 
> know what this error means,
> or where it could be related to.
>
> thx,
>
> hendrik
>
>
>
>
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
>



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: cgi-problems

Posted by Owen Boyle <ob...@bourse.ch>.
Hendrik Daldrup wrote:
> 
> hi there,
> 
> i still have some cgi-problems.
> everything is working fine, but some scripts produce the following error:
> 
> "Premature end of script headers: /......./cgi-bin/script_name"
> 
> problems is i have no clue about perl/cgi stuff, so that i dont even
> know what this error means,
> or where it could be related to.

It means the script is not putting out a proper CGI header before
anything else. This could be because:

- you didn't tell it to produce a header
- there is another error which produces output before it gets to the
header.

Read http://httpd.apache.org/docs/howto/cgi.html#writingacgiprogram

to see what this is all about.

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org