httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Kubat <ka...@e-tunity.com>
Subject Re: [users@httpd] passing all env vars to a cgi
Date Thu, 12 Feb 2009 09:44:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

- --
Best regards / met vriendelijke groet, Karel Kubat
Mob +31 6 2956 4861



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkmT74UACgkQ23FrzRzybNVyYgCgpsERT0eTcWP2V5+WW1FbpuEM
6DAAoJL98/BYpajcFxOF698OE+FR6iNO
=dlo3
-----END PGP SIGNATURE-----

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