Hi,

When I post to a PHP script, I lose ALL of environment variables - in fact, the only variables I have are the ones I posted, but I need $REMOTE_USER for the script to work ..

Just to make it clear, I can't access it via $_SERVER["REMOTE_USER"], getenv("REMOTE_USER"), $REMOTE_USER or any other POSSIBLE way php has to access it .. $PHP_AUTH_USER and so on. It's gone, baby, gone.

I have register_globals set to on and enabled track vars on my install.

What's goin' on?

Cheers

    Ok, this is kinda weird;

    I have an include at the top of each page; it has a lot of general functions, like printing page headers, as well as calling ANOTHER include that initiates DB connection etc

    Anyway, for some reason $SERVER loses it's super global status when I post to the script that calls the include that sets define("USER",$SERVER["REMOTE_USER"])

    HOWEVER, if I put

    global $_SERVER;

    before it, there's no prob .. I thought $_SERVER was a superglobal?

    Quote:

    " ..This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. You don't need to do a global $_SERVER; to access it within functions or methods, as you do with $HTTP_SERVER_VARS. .."

      Write a Reply...