httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Ray <...@blazestudios.com>
Subject Re: [users@httpd] Quick question
Date Fri, 13 Dec 2002 04:19:05 GMT
Chad-

That helped, but now I'm having another issue. It seems that the script 
that I wrote works fine if it runs as apache but when I run as a user 
(me) error_log kicks back that I have a premature end of script headers. 
When I run it from the command line, it appears not to run through the 
part of the script that checks to see if the data was sent via post or 
get and then parses it. Here's that part of the code

 if ($ENV{'REQUEST_METHOD'} eq 'GET') {
     @pairs = split(/&/, $ENV{'QUERY_STRING'});
        } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  @pairs = split(/&/, $buffer);

        if ($ENV{'QUERY_STRING'}) {
         @getpairs =split(/&/, $ENV{'QUERY_STRING'});
                push(@pairs,@getpairs);
        }

} else {
   print "Try Post or Get";

}

It seems to automatically go to the else statement and fails to parse 
the data, so it then never excutes the part of the script that untaints 
the data.

I'm a little lost here. The script runs fine if it runs as apache but 
not as a user...and I need it to run as a user.

Any help would be great!

Thanks.


Chad Morland wrote:

>http://httpd.apache.org/docs/suexec.html
>
>
>-CM
>----- Original Message -----
>From: "Tom Ray" <tom@blazestudios.com>
>To: <users@httpd.apache.org>
>Sent: Thursday, December 12, 2002 4:36 PM
>Subject: [users@httpd] Quick question
>
>
>  
>
>>I'm not sure if this is off topic or what. But I have a Red Hat 7.1
>>running apache running that latest version of apache 1.x.x, and I'm
>>having a small problem.
>>
>>All the CGI scripts are running as the user apache, I want them to run
>>as the user that is using the script. So if I have a script I want it
>>    
>>
>to
>  
>
>>run as tom not apache...I'm not sure how to make this happen..
>>
>>Can anyone help me?
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>  
>


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


Mime
View raw message