You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Daniel Lopez <da...@rawbyte.com> on 2001/12/18 01:46:24 UTC

Re: Apache beta 2.0.28 upgrade from 2.0.18 woes


The premature end of script headers may be caused for a variety of reasons,
among them :
- Permissions of the script: does the script has executable permissions? Is
the directory containing the script and the parent ones have read
permissions for the user Apache runs as?
- Have you enabled the directory to have CGI execution permissions? (Check
you have Scriptalias enabled for that directory)
- The script itself is broken (but you say it works in .18, so I would look
first at the above)


On Mon, Dec 17, 2001 at 05:34:17PM -0800, Jacob C. wrote:
> Hi all,
> 
> I just joined the list, but have searched through the bug database on this and found nothing.  And since I prefer lists for support as opposed to filing (possibly erroneous) bug reports, here's my problem:
> 
> I have been running Apache 2.0.18 since June.  I decided since the 2.0.28 beta was out I should look at upgrading and testing the new stuff.  I compiled and installed 2.0.28 into a new directory (/usr/local/apache, my original .18 beta is in /usr/local/apache2).  I modified the new conf/httpd.conf file to have the same user/group and other related settings as .18 (if you copy the httpd.conf file over the server won't start, so some things have changed).  I also installed php 4.1.0.  I compiled 2.0.28 with the following directives:
> 
> --prefix=/usr/local/apache
> --enable-mime-magic
> --with-ssl=/usr/local/ssl
> --with-mpm=worker
> --enable-dav
> --enable-so
> 
> I have some compiled cgi-bin programs, written in C++, that run in my .18 server.  I copied them directly over to the .28 server and made sure permissions and owner/group are the same.
> 
> When I run the binary, I get (in my error log) Premature end of script headers: /path/to/my/cgi-bin/program
> 
> I switch back to .18 and the very same binary runs fine.  Any ideas?  I get the same error running printenv too.
> 
> Any ideas?
> 
> Thanks,
> Jacob Cord
> 
> ---------------------------------------------------------------------
> 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: Apache beta 2.0.28 upgrade from 2.0.18 woes

Posted by Joshua Slive <jo...@slive.ca>.
> From: Jacob C. [mailto:jacobc@chiefarchitect.com]
>
> Well I backed up and did some testing on the way and I think I
> know where the problem is now.  The cgi-bin programs work until I
> enable PHP and introduce the following "Files" directive into the
> httpd.conf file:
>
> <Files *.php>
> 	SetOutputFilter PHP
> 	SetInputFilter PHP
> </Files>
>
> This is not under any <Directory> or anything else.  It worked
> for 2.0.18, but causes problems with 2.0.28.  Am I using the
> <Files> part wrong?

Hmmm... Does PHP really work as an InputFilter?  Try removing the
SetInputFilter line and see if it works.

Joshua.


---------------------------------------------------------------------
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: Apache beta 2.0.28 upgrade from 2.0.18 woes

Posted by "Jacob C." <ja...@chiefarchitect.com>.
On Mon, 17 Dec 2001 16:46:24 -0800
Daniel Lopez <da...@rawbyte.com> wrote:

> 
> 
> The premature end of script headers may be caused for a variety of reasons,
> among them :
> - Permissions of the script: does the script has executable permissions? Is
> the directory containing the script and the parent ones have read
> permissions for the user Apache runs as?
> - Have you enabled the directory to have CGI execution permissions? (Check
> you have Scriptalias enabled for that directory)
> - The script itself is broken (but you say it works in .18, so I would look
> first at the above)
> 

Well I backed up and did some testing on the way and I think I know where the problem is now.  The cgi-bin programs work until I enable PHP and introduce the following "Files" directive into the httpd.conf file:

<Files *.php>
	SetOutputFilter PHP
	SetInputFilter PHP
</Files>

This is not under any <Directory> or anything else.  It worked for 2.0.18, but causes problems with 2.0.28.  Am I using the <Files> part wrong?

Thanks for the help,
Jacob Cord

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


What is the trick to reliable piped logging?

Posted by Lee Lester <le...@unico.com.au>.
I am running apache-ssl Apache/1.3.19 Ben-SSL/1.44 (Unix) and 
have set up the error log to be piped into a perl program (called 
a_iface.pl which waits for input from STDIN and sends it to another 
process via a TCP socket). Occasionally the perl program receives 
an EOF from Apache and dies, but no new process is restarted. I've 
tried to test it by starting Apache, then using ps to find a_iface.pl 
and killing it. I get something like:

    root  3328  3327  0 11:37:37 ?        0:00 /bin/sh -c  
/home/lam/bin/a_iface.pl 
    root  3324     1  1 11:37:34 pts/3    0:00 perl 
/home/lam/bin/a_iface.pl
    root  3329  3328  1 11:37:37 ?        0:00 perl 
/home/lam/bin/a_iface.pl

If I kill the two perl processes, all die and Apache continues on 
without doing any more logging as far as I can tell. No new 
processes are created.

What do I have to do to get the "reliable" piped logging? I've read 
what documentation I can find. It mentions restarts occur only if the 
program crashes - how does Apache perceive a crash? Does it have 
to send some sort of signal to its parent? Does my program have to 
exit with a particular code? I've made it exit with a non-zero code, 
but it doesn't make any difference. The only way I seem to be able 
to get new processes is to restart Apache myself.




Lee Lester
UNICO Computer Systems P/L 3 Bowen Cres Melbourne Vic 3004 Australia
Tel +61 3 9866 5688
lee@unico.com.au
"Pretty women walking with gorillas down my street"

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