httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <>
Subject Re: [users@httpd] passing all env vars to a cgi
Date Thu, 12 Feb 2009 08:51:22 GMT
On Thu 12 Feb 2009, J├╝rgen Mathwich wrote:
> 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.

Why not just read that file?

If you are using perl perhaps the following one-liner helps. In your 
script it would look like "%ENV=do{...};"

perl -Mstrict -MData::Dumper -e 'my %h=do{local $_; local $/="\0"; local 
@ARGV=("/proc/".getppid."/environ"); map {split /=/, $_, 2} <>}; print 
Dumper \%h'


Need professional mod_perl support?
Just hire me:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message