Re: passing all env vars to a cgi

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

 



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'

Torsten

-- 
Need professional mod_perl support?
Just hire me: torsten.foertsch@xxxxxxx

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