<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Premature end of script headers</title>
	<atom:link href="http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/feed/" rel="self" type="application/rss+xml" />
	<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/</link>
	<description>Web design, search engine optimization and Internet marketing</description>
	<lastBuildDate>Fri, 20 Apr 2012 18:35:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Diane Vigil</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-146066</link>
		<dc:creator>Diane Vigil</dc:creator>
		<pubDate>Mon, 23 Jan 2012 20:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-146066</guid>
		<description>Not really, since I don&#039;t know what your greeting.pl has in it, nor what you tried.

Scroll to the top of this page, and click on the &quot;premature end of script headers&quot; link. That may give you the information you need.</description>
		<content:encoded><![CDATA[<p>Not really, since I don't know what your greeting.pl has in it, nor what you tried.</p>
<p>Scroll to the top of this page, and click on the "premature end of script headers" link. That may give you the information you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-146065</link>
		<dc:creator>Madhu</dc:creator>
		<pubDate>Mon, 23 Jan 2012 19:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-146065</guid>
		<description>Hi

I am getting the error:

Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: greeting.pl

As updated in this blog, I updated the permissions for the folder and also tried everything but the error still stays.

could you help me</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I am getting the error:</p>
<p>Server error!</p>
<p>The server encountered an internal error and was unable to complete your request.</p>
<p>Error message:<br />
Premature end of script headers: greeting.pl</p>
<p>As updated in this blog, I updated the permissions for the folder and also tried everything but the error still stays.</p>
<p>could you help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diane Vigil</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145802</link>
		<dc:creator>Diane Vigil</dc:creator>
		<pubDate>Wed, 01 Sep 2010 04:01:44 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145802</guid>
		<description>Ah, interesting. Thanks for the update.</description>
		<content:encoded><![CDATA[<p>Ah, interesting. Thanks for the update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Belmar</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145801</link>
		<dc:creator>Alex Belmar</dc:creator>
		<pubDate>Wed, 01 Sep 2010 03:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145801</guid>
		<description>sorry for the replay, at the first message where edition errors, here is the good one:

Hi!!

Thanks for all your support.

Here is the solution and some concepts that i could find during this troubleshooting process for perl in RedHat and the use of suexec policies:

at the &lt;virtualhost adress:port&gt; section  we must put the following line
SuexecUserGroup  username username

where &quot;username&quot; is the name of user that own the path where the html &amp; cgi files are located: example /home/abelma1 below this directory are the following subdirectories: www/&quot;virtualhostname&quot;

The   full path is &quot;/home/abelma1/www/abelmar.net&quot; this could be the value of your  ScriptAlias directive inside the same section:

    ScriptAlias    /cgi-bin/ &quot;/home/abelma1/www/abelmar.net/&quot;
The complete example:

&lt;VirtualHost adress:port$gt; 
    SuexecUserGroup abelma1 abelma1
    ServerName     abelmar.net
    ServerAlias    www.abelmar.net
    ServerAdmin    webmaster@abelmar.net

    Alias    /abelmar.net/ &quot;/home/abelma1/www/abelmar.net/&quot;
    ScriptAlias    /cgi-bin/ &quot;/home/abelma1/www/abelmar.net/&quot;

    DocumentRoot   /home/abelma1/www/abelmar.net

    &lt;Directory /home/abelma1/www/abelmar.net&gt;
        AllowOverride All
	Options Includes Indexes FollowSymLinks ExecCGI MultiViews
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;
    &lt;IfModule mod_rewrite.c&gt;
        RewriteEngine On
        RewriteOptions inherit
    &lt;/IfModule&gt;

.
&lt;/VirtualHost&gt;

At cgi files level and directory level too, we need to assign them the owner &quot;abelma1&quot; as user and we need to assign  the  same user name &quot;abelma1&quot; as a group name, where &quot;abelma1&quot; is the user that manage apache for certain path. 

What cause the problem on a virtual host schema: 
if suexecUserGroup user and group   are different to the owner of the path indicated at the  DocumentRoot directive  inside the &lt;virtualhost...&gt; section at the configuration file of  apache, the suexec policies give us an error 500 at  server and the execution of cgi is aborted.</description>
		<content:encoded><![CDATA[<p>sorry for the replay, at the first message where edition errors, here is the good one:</p>
<p>Hi!!</p>
<p>Thanks for all your support.</p>
<p>Here is the solution and some concepts that i could find during this troubleshooting process for perl in RedHat and the use of suexec policies:</p>
<p>at the &lt;virtualhost adress:port&gt; section  we must put the following line<br />
SuexecUserGroup  username username</p>
<p>where "username" is the name of user that own the path where the html &amp; cgi files are located: example /home/abelma1 below this directory are the following subdirectories: www/"virtualhostname"</p>
<p>The   full path is "/home/abelma1/www/abelmar.net" this could be the value of your  ScriptAlias directive inside the same section:</p>
<p>    ScriptAlias    /cgi-bin/ "/home/abelma1/www/abelmar.net/"<br />
The complete example:</p>
<p>&lt;VirtualHost adress:port$gt;<br />
    SuexecUserGroup abelma1 abelma1<br />
    ServerName     abelmar.net<br />
    ServerAlias    <a href="http://www.abelmar.net" rel="nofollow">http://www.abelmar.net</a><br />
    ServerAdmin    <a href="mailto:webmaster@abelmar.net">webmaster@abelmar.net</a></p>
<p>    Alias    /abelmar.net/ "/home/abelma1/www/abelmar.net/"<br />
    ScriptAlias    /cgi-bin/ "/home/abelma1/www/abelmar.net/"</p>
<p>    DocumentRoot   /home/abelma1/www/abelmar.net</p>
<p>    &lt;Directory /home/abelma1/www/abelmar.net&gt;<br />
        AllowOverride All<br />
	Options Includes Indexes FollowSymLinks ExecCGI MultiViews<br />
        Order allow,deny<br />
        Allow from all<br />
    &lt;/Directory&gt;<br />
    &lt;IfModule mod_rewrite.c&gt;<br />
        RewriteEngine On<br />
        RewriteOptions inherit<br />
    &lt;/IfModule&gt;</p>
<p>.<br />
&lt;/VirtualHost&gt;</p>
<p>At cgi files level and directory level too, we need to assign them the owner "abelma1&#8243; as user and we need to assign  the  same user name "abelma1&#8243; as a group name, where "abelma1&#8243; is the user that manage apache for certain path. </p>
<p>What cause the problem on a virtual host schema:<br />
if suexecUserGroup user and group   are different to the owner of the path indicated at the  DocumentRoot directive  inside the &lt;virtualhost&#8230;&gt; section at the configuration file of  apache, the suexec policies give us an error 500 at  server and the execution of cgi is aborted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diane Vigil</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145798</link>
		<dc:creator>Diane Vigil</dc:creator>
		<pubDate>Tue, 31 Aug 2010 22:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145798</guid>
		<description>I&#039;d contact your web host about that. I did find a discussion about it:

http://linux.derkeiler.com/Mailing-Lists/RedHat/2004-04/0128.html

which says:

&lt;blockquote&gt;In any case, I ended up changing the GID of users from 100 to 500 in /etc/groups and changed the user&#039;s default group in /etc/passwd from 100 to 500 and reset the ownerships on their files. Everything seems to be working now. 

Its odd because the scripts in /var/www/cgi-bin can be owned by anyone and run so that pretty much does away with the security precautions...
&lt;/blockquote&gt;

However, I haven&#039;t dealt with this and don&#039;t know what that might affect, so I&#039;d contact your web host.</description>
		<content:encoded><![CDATA[<p>I'd contact your web host about that. I did find a discussion about it:</p>
<p><a href="http://linux.derkeiler.com/Mailing-Lists/RedHat/2004-04/0128.html" rel="nofollow">http://linux.derkeiler.com/Mailing-Lists/RedHat/2004-04/0128.html</a></p>
<p>which says:</p>
<blockquote><p>In any case, I ended up changing the GID of users from 100 to 500 in /etc/groups and changed the user's default group in /etc/passwd from 100 to 500 and reset the ownerships on their files. Everything seems to be working now. </p>
<p>Its odd because the scripts in /var/www/cgi-bin can be owned by anyone and run so that pretty much does away with the security precautions&#8230;
</p></blockquote>
<p>However, I haven't dealt with this and don't know what that might affect, so I'd contact your web host.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Belmar</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145797</link>
		<dc:creator>Alex Belmar</dc:creator>
		<pubDate>Tue, 31 Aug 2010 22:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145797</guid>
		<description>thanks, for your quickly response, the path is right, but i discovered that the problem is other.

I think that the problem is that the server runs under  suexec   policies.

I get no more the header error message, i am getting an other one, to be honest is the very first time that i am working under suexec policies, but is mandatory with this ISP.

the new error that i am investigating is this:
[2010-08-31 16:27:13]: uid: (500/abelma1) gid: (48/48) cmd: test01.cgi
[2010-08-31 16:27:13]: cannot run as forbidden gid (48/test01.cgi)

I set  the SuexecUserGroup to abelma1 apache at   section.
the directory that contains all the scripts, has abelma1 as the owner and apache as the group and all the files and directories under it has the same  ownership.

 Thank in advance for your help</description>
		<content:encoded><![CDATA[<p>thanks, for your quickly response, the path is right, but i discovered that the problem is other.</p>
<p>I think that the problem is that the server runs under  suexec   policies.</p>
<p>I get no more the header error message, i am getting an other one, to be honest is the very first time that i am working under suexec policies, but is mandatory with this ISP.</p>
<p>the new error that i am investigating is this:<br />
[2010-08-31 16:27:13]: uid: (500/abelma1) gid: (48/48) cmd: test01.cgi<br />
[2010-08-31 16:27:13]: cannot run as forbidden gid (48/test01.cgi)</p>
<p>I set  the SuexecUserGroup to abelma1 apache at   section.<br />
the directory that contains all the scripts, has abelma1 as the owner and apache as the group and all the files and directories under it has the same  ownership.</p>
<p> Thank in advance for your help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diane Vigil</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145796</link>
		<dc:creator>Diane Vigil</dc:creator>
		<pubDate>Tue, 31 Aug 2010 21:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145796</guid>
		<description>Hm. Is Perl running on the server, and is the path to Perl correct in your script? (I presume you&#039;ve set the correct permissions, or you would have gotten an error page.)

ADDED: Your ISP may have some .cgi scripts uploaded; you might take a look at those to see how they specify things.</description>
		<content:encoded><![CDATA[<p>Hm. Is Perl running on the server, and is the path to Perl correct in your script? (I presume you've set the correct permissions, or you would have gotten an error page.)</p>
<p>ADDED: Your ISP may have some .cgi scripts uploaded; you might take a look at those to see how they specify things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Belmar</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145795</link>
		<dc:creator>Alex Belmar</dc:creator>
		<pubDate>Tue, 31 Aug 2010 20:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-145795</guid>
		<description>Hi: 
I have the same error, here is my issue:  

I have my apps  at a Red Hat Linux, it is not my preferred. 
The ISP where is the service that i am using has a very complex control panel that use Perl with a very sophisticated configuration that  force me to run under a vitualhost section.  
I can run, for example, php and  python with no problems, but the other perl applications that work over FreeBSD unix and solaris with no problems, didn´t run there.  
I tried adding the line that you recommend, but nothing happened, also I checked the permissions and all is ok, the files are in ascii format 
Some ideas?
, thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi:<br />
I have the same error, here is my issue:  </p>
<p>I have my apps  at a Red Hat Linux, it is not my preferred.<br />
The ISP where is the service that i am using has a very complex control panel that use Perl with a very sophisticated configuration that  force me to run under a vitualhost section.<br />
I can run, for example, php and  python with no problems, but the other perl applications that work over FreeBSD unix and solaris with no problems, didn´t run there.<br />
I tried adding the line that you recommend, but nothing happened, also I checked the permissions and all is ok, the files are in ascii format<br />
Some ideas?<br />
, thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diane Vigil</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-40867</link>
		<dc:creator>Diane Vigil</dc:creator>
		<pubDate>Tue, 08 Apr 2008 19:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-40867</guid>
		<description>You&#039;re very welcome, Sneha --- and I truly understand what you mean!</description>
		<content:encoded><![CDATA[<p>You're very welcome, Sneha &#8212; and I truly understand what you mean!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sneha</title>
		<link>http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-40866</link>
		<dc:creator>Sneha</dc:creator>
		<pubDate>Tue, 08 Apr 2008 19:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://developedtraffic.com/2005/09/30/premature-end-of-script-headers/#comment-40866</guid>
		<description>Thank you so much, I google whole day but did not find anything. But this post seems useful. It helped me to figure out the error. I was banging my head in wall whole for &quot;Premature end of script headers&quot;. Thank you!! You saved me from trouble!</description>
		<content:encoded><![CDATA[<p>Thank you so much, I google whole day but did not find anything. But this post seems useful. It helped me to figure out the error. I was banging my head in wall whole for "Premature end of script headers". Thank you!! You saved me from trouble!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

