Reading REMOTE_USER from env do not work 
Author Message
 Reading REMOTE_USER from env do not work

Quote:

> hi there,

> set who_is_this [env(REMOTE_USER)]

> the above code do not work, but CONENT_LEGTH works fine.

> why ?

You are telling the script to execute a command named
"env(REMOTE_USER)", which almost certainly doesn't exist. What you
probably wanted to do was this:

set who_is_this $env(REMOTE_USER)

--

Software Engineer                 http://www.*-*-*.com/ ~oakley/
Healthcare Communications, Inc.   http://www.*-*-*.com/



Fri, 30 Jul 1999 03:00:00 GMT  
 Reading REMOTE_USER from env do not work

Quote:

> hi there,

> set who_is_this [env(REMOTE_USER)]

> the above code do not work, but CONENT_LEGTH works fine.

> why ?

REMOTE_USER is rarely set.

--
? 1995,1996,1997 Michael Salmon
All opinions expressed in this article remain the property of
Michael Salmon.  Permission is hereby granted for use in
followup articles, FAQ's and digests.



Sat, 31 Jul 1999 03:00:00 GMT  
 Reading REMOTE_USER from env do not work


Quote:

>hi there,

>set who_is_this [env(REMOTE_USER)]

>the above code do not work, but CONENT_LEGTH works fine.

>why ?

I have no idea what you're after, but I suspect

        set who_is_this $env(REMOTE_USER)

will get you closer to your goal than what you
have above.
--

Cameron Laird           http://starbase.neosoft.com/~claird/home.html

                        +1 713 996 8546 FAX



Sat, 31 Jul 1999 03:00:00 GMT  
 Reading REMOTE_USER from env do not work

Mario Glas was having trouble with CGI scripts:

My guess is that you tried "set who_is_this [env(REMOTE_USER)]" (which
is wrong, as others have said), because the more sensible code gave you
no answer!  This is probably because REMORE_USER is empty.  The
following useful script (from Don LIbes, I believe) shows you what bits
of environment your server can see.

Cheers
Neil

#!/usr/local/bin/tclsh
#
# prints environment visible from inside CGI script

proc htmlparray {name} {
        upvar $name a
        foreach el [lsort [array names a]] {
                puts "$el = $a($el)"
                puts "<br>"
        }

Quote:
}

puts "Content-type: text/html\n"

# [b] header
puts {<html>}
puts {<head>}
puts {<title>Print environment</title>}
puts {</head>}
puts {}

htmlparray env

puts {</body>}
puts {</html>}



Sat, 31 Jul 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. setting REMOTE_USER CGI env. var

2. can't read env(DISPLAY) from regexp with $env(DISPLAY)

3. Q: Reading file in multiple times not working!

4. read statement works on dos compiler, not unix

5. Dos Env Read & write

6. read compress file in Unix env.

7. expect can't read env(TCL_LIBRARY)

8. Testing and reading env variables on Windows

9. unset env, array set env ...

10. env array not defined?

11. PATH and COMSPEC not uppercased in env on Windows

12. Intermittent env(OS) not found error

 

 
Powered by phpBB® Forum Software