You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Mutchler <so...@leibnizcreations.com> on 2003/05/18 21:29:42 UTC
[users@httpd] premature end of headers script error
I am running moveabletype on one of my subhosts, and for whatever
reason, the .cgi scripts will not execute properly on it. I have it
working just fine for my main domain, it is just the subhost that it
will not function for.
Here is the VirtualHost tag I have in my httpd.conf file:
<VirtualHost 198.173.254.123:80>
User amy
Group www
ServerAlias mutchlerfamily.org www.mutchlerfamily.org
ServerName mutchlerfamily.org
ServerAdmin amy@mutchlerfamily.org
DocumentRoot /usr/local/apache/mutchlerfamily/html
ErrorLog /usr/local/apache/mutchlerfamily/logs/error_log
<Directory "/usr/local/apache/mutchlerfamily/html">
Options Indexes FollowSymLinks MultiViews Includes
ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I also have the AddHandler line setup for .cgi scripts, and it is
working. I have tried having the above <Directory> tag inside and out
of the VirtualHost declaration ... it still won't work.
Any suggestions would be appreciated, as this has got me pretty well
stumped. Oh, I am running version:
Server version: Apache/1.3.27 OpenSSL/0.9.6i (Unix)
FreeBSD leibnizcreations.com 4.7-RELEASE-p7 FreeBSD 4.7-RELEASE-p7 #18:
Thu Mar 27 12:46:12 MST 2003 root@fc2:/usr/src/sys/compile/VKERN
i386
--
chris mutchler
soukihei@leibnizcreations.com
---------------------------------------------------------------------
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] premature end of headers script error
Posted by Joseph A Nagy Jr <jo...@charter.net>.
Chris Mutchler wrote:
> I am running moveabletype on one of my subhosts, and for whatever
> reason, the .cgi scripts will not execute properly on it. I have it
> working just fine for my main domain, it is just the subhost that it
> will not function for.
<snip>
Okay, I've found it has NOTHING to do with your settings. What you need
to do is open the file, go to the VERY end. There will be an extra
whitespace line at the end of the file, what you need to do is go to it,
backspace to the last line of actualy type, save and exit. That's the
only solution that I know of.
---------------------------------------------------------------------
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] premature end of headers script error
Posted by Chris Mutchler <so...@leibnizcreations.com>.
I managed to get this working yesterday afternoon. Unfortunately, I
still don't know why it is working. Here is what I did:
1. I moved my "main" domain out of /usr/local/apache/htdocs and placed
it in /usr/local/apache/vhosts/domainname
2. I then moved my problematic subhost into /usr/local/apache/htdocs.
Surprisingly enough, both domains now work just fine. I still think it
is a really hacked-up way to have it running, but it does. The only
thing I can think of, is that the development team for our platform
munged something up and didn't realize it.
Thanks for all the suggestions.
--
chris mutchler
soukihei@leibnizcreations.com
-----Original Message-----
From: Joseph A Nagy Jr [mailto:joseph_a_nagy_jr@charter.net]
Sent: Sunday, May 18, 2003 3:04 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] premature end of headers script error
Jeff Cohen wrote:
> Check his Vhost configuration and you'll figure out why it won't work
even
> if he'll do what you suggested.
>
> Jeff Cohen
> Jeff@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!
If you remember, he enabled AddHandler .cgi so having a cgi-bin
ScriptAliased is redundant (btw, AddHandler .cgi is one of those BAD
things IMO).
---------------------------------------------------------------------
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 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] premature end of headers script error
Posted by Joseph A Nagy Jr <jo...@charter.net>.
Jeff Cohen wrote:
> Check his Vhost configuration and you'll figure out why it won't work even
> if he'll do what you suggested.
>
> Jeff Cohen
> Jeff@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!
If you remember, he enabled AddHandler .cgi so having a cgi-bin
ScriptAliased is redundant (btw, AddHandler .cgi is one of those BAD
things IMO).
---------------------------------------------------------------------
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] premature end of headers script error
Posted by Jeff Cohen <su...@gej-it.com>.
Check his Vhost configuration and you'll figure out why it won't work even
if he'll do what you suggested.
Jeff Cohen
Jeff@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!
> -----Original Message-----
> From: Joseph A Nagy Jr [mailto:joseph_a_nagy_jr@charter.net]
> Sent: Sunday, May 18, 2003 4:54 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] premature end of headers script error
>
> Jeff Cohen wrote:
> <snip>
>
> Premature end of script headers has nothing to do with the setup of the
> vhost or location of perl (if you point incorrectly to perl you'd just
> get the cgi as a plain txt file). For some reason, you have to file the
> method I outlined in my previous post. This works on both Windows and
> Unix servers for the same problem. I don't know why it needs to be done
> like that, it just does.
>
>
> ---------------------------------------------------------------------
> 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 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] premature end of headers script error
Posted by Joseph A Nagy Jr <jo...@charter.net>.
Jeff Cohen wrote:
<snip>
Premature end of script headers has nothing to do with the setup of the
vhost or location of perl (if you point incorrectly to perl you'd just
get the cgi as a plain txt file). For some reason, you have to file the
method I outlined in my previous post. This works on both Windows and
Unix servers for the same problem. I don't know why it needs to be done
like that, it just does.
---------------------------------------------------------------------
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] premature end of headers script error
Posted by Jeff Cohen <su...@gej-it.com>.
Hi Chris,
Try this:
<VirtualHost 198.173.254.123:80>
User amy
Group www
ServerName mutchlerfamily.org
ServerAlias www.mutchlerfamily.org
ServerAdmin amy@mutchlerfamily.org
DocumentRoot /usr/local/apache/mutchlerfamily/html
ErrorLog /usr/local/apache/mutchlerfamily/logs/error_log
<Directory /usr/local/apache/mutchlerfamily/html>
AddHandler cgi-script .cgi .pl
Options +ExecCGI -Indexes
Order allow,deny
Allow from all
</Directory>
Also make sure that you know where perl executable is located in your
system, type whereis perl and you'll find it and put it as your first line
in your script, just like that:
#!/usr/sbin/perl
All the best,
Jeff Cohen
Jeff@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!
> -----Original Message-----
> From: Chris Mutchler [mailto:soukihei@leibnizcreations.com]
> Sent: Sunday, May 18, 2003 3:30 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] premature end of headers script error
>
> I am running moveabletype on one of my subhosts, and for whatever
> reason, the .cgi scripts will not execute properly on it. I have it
> working just fine for my main domain, it is just the subhost that it
> will not function for.
>
> Here is the VirtualHost tag I have in my httpd.conf file:
>
> <VirtualHost 198.173.254.123:80>
> User amy
> Group www
> ServerAlias mutchlerfamily.org www.mutchlerfamily.org
> ServerName mutchlerfamily.org
> ServerAdmin amy@mutchlerfamily.org
> DocumentRoot /usr/local/apache/mutchlerfamily/html
> ErrorLog /usr/local/apache/mutchlerfamily/logs/error_log
> <Directory "/usr/local/apache/mutchlerfamily/html">
> Options Indexes FollowSymLinks MultiViews Includes
> ExecCGI
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> </VirtualHost>
>
> I also have the AddHandler line setup for .cgi scripts, and it is
> working. I have tried having the above <Directory> tag inside and out
> of the VirtualHost declaration ... it still won't work.
>
> Any suggestions would be appreciated, as this has got me pretty well
> stumped. Oh, I am running version:
>
> Server version: Apache/1.3.27 OpenSSL/0.9.6i (Unix)
> FreeBSD leibnizcreations.com 4.7-RELEASE-p7 FreeBSD 4.7-RELEASE-p7 #18:
> Thu Mar 27 12:46:12 MST 2003 root@fc2:/usr/src/sys/compile/VKERN
> i386
>
>
>
> --
> chris mutchler
> soukihei@leibnizcreations.com
>
>
>
> ---------------------------------------------------------------------
> 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 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