Re: passing all env vars to a cgi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag 12 Februar 2009 10:44:37 schrieb Karel Kubat:
> Hi,
>
> On Feb 12, 2009, at 8:59 AM, Jürgen Mathwich wrote:
> > I 've got a problem regarding apache's environ handling. I know
> > about the usage of SetEnv and
> > PassEnv. To use them I have to know the key/name of every single
> > environ variable.
> >
> > When doing a
> >
> > # cat /proc/<APACHE-PID>/environ
> >
> > it shows me more variables than the cgi knows about. Now I have a
> > project where I need to pass all
> > the vars without knowing their keys to the cgi (just ALL of them),
> > but I don't have any idea how to
> > solve this in a easy way.
> >
> > Maybe some of you had a similar problem in the past and know how to
> > solve it.
>
> This will depend on the platform of your CGI programs. E.g., in Perl
> there is the hash %ENV. In C there is the third argument to main(),
> **envp. In shell script you can use your above way, but more portable
> is running /usr/bin/env.


Thanks for your reply.If I try something like 

#!/usr/bin/perl

use Data::Dumper;
print "Content-type: text/plain\n\n";
print Dumper \%ENV;

as test.cgi to run in apache the env vars heavily differ from everthing seen at login shell (i know 
that apache runs in a special environment most of time) or, even more strange, from the environment 
variables the apache process knows about. (seen in /proc/PID/environ)

I simply can not adopt my applications to re-write the %ENV - I really need apache to do that 
initially for all cgi scripts.

Regards
 Juergen




---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux