Mike Wille wrote:
> There are a few scripts that use system calls (``).  There are scripts that
> don't use system calls at all and still have the 0.  None of them create any
> subprocesses.
> 
> I checked to see if mod_perl was handling the scripts that sent the '0' but
> perl is indeed handling them and not httpd.

As Darren has suggested please try this script:

#!/usr/bin/perl -wT

print "Content-type: text/plain\n\n";
print "Running under ";
print $ENV{MOD_PERL} ? "mod_perl" : "mod_cgi";

and if you get mod_perl, and you don't know to figure out why, start 
from scratch, remove all configs you have added to the default 
httpd.conf and then start adding one by one and see what you are doing 
wrong.

e.g. I don't see where is your ScriptAlias setting. You cannot run 
mod_cgi without setting ScriptAlias or using

SetHandler default-handler

for example see:
http://perl.apache.org/guide/config.html#Overriding_Location_Setting_in
and the rest of the chapter

> For testing this problem I have a standard setup:
> 
> <Directory "/home/www/cgi-bin">
>    AllowOverride None
>    Options None
>    Order allow,deny
>    Allow from all
>    Options +ExecCGI
> </Directory>
> 
> The mod_perl script directory:
> 
> <Directory "/home/www/perl">
>    SetHandler perl-script
>    PerlHandler Apache::Registry
>    Options +ExecCGI
>    PerlSendHeader on
>    PerlModule Apache::DBI Apache::StatINC
>    AllowOverride All
> </Directory>
> 
> The server is running Apache 1.3.20.  I'm not sure how to find the version
> of mod_perl...
> 
> Nothing looks out of wack does it?  Anything running in cgi-bin has a '0'
> appended to it and is exceuted by perl.  Anything in perl does not have the
> '0' and is executed by httpd.
> 
> - Mike
> 
> -----Original Message-----
> From: darren chamberlain [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 21, 2002 11:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: 0 being appended to non mod_perl scripts.
> 
> 
> Quoting Mike Wille <[EMAIL PROTECTED]> [Mar 21, 2002 11:36]:
> 
>>I apologize if this has already been answered elsewhere, I
>>haven't been able to find it.
>>
>>I am encountering a wierd problem where perl scripts running
>>under a normal cgi-bin (ie no mod_perl) have a '0' appended to
>>the output.  This does not happen to scripts run under
>>mod_perl.  It also only happens when PerlSendHeader is set to
>>on.  I thought that PerlSendHeader was a mod_perl only
>>directive, but just to check I added PerlSendHeader off to the
>>cgi-bin directory.  That had no effect.
>>
>>Has anyone else encountered this and how did you fix it?
> 
> 
> This looks like an exit code to me.  Does the script create
> subprocesses or use system?  Also, if PerlSendHeader is making
> the script behave differently, it sounds like mod_perl is
> handling your script (you can check for $ENV{MOD_PERL}).
> 
> (darren)
> 
> --
> People who are willing to give up freedom for the sake of short
> term security, deserve neither freedom nor security.
>     -- Ben Franklin



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/

Reply via email to