Skip to main content
Participant
April 19, 2008
Question

CGI.HTTP_REMOTE_USER vs CGI.REMOTE_USER

  • April 19, 2008
  • 3 replies
  • 1914 views
We've got about 500 Cold Fusion version 6.1 pages that use the variable CGI.HTTP_REMOTE_USER. One of our folks set us up a test server and installed CF v7. Now the CGI.HTTP ..... variable won't work. CGI.REMOTE_USER works but I don't want to change 500 pages. Is something set up differently on this test sever, did the HTTP variable suddenly go away, or what's going on? Need help - getting desperate. Thanks.
    This topic has been closed for replies.

    3 replies

    BKBK
    Community Expert
    Community Expert
    April 22, 2008
    Take a look at the following Coldfusion documentation:

    Request CGI variables supported by MX6.1
    Server CGI variables supported by MX6.1
    Client CGI variables supported by MX6.1

    List of CGI variables supported by MX7

    Apparently, both MX6.1 and MX7 support CGI.REMOTE_USER, but not CGI.HTTP_REMOTE_USER. A point that relates to this is the testing for the existence of CGI variables. The documentation says, "Because some browsers do not support some CGI variables, ColdFusion always returns True when it tests for the existence of a CGI variable, regardless of whether the browser supports the variable."

    Hence, the following code will display Yes.

    <cfoutput>#isDefined("cgi.any_arbitrary_var_name")#</cfoutput>


    BKBK
    Community Expert
    Community Expert
    April 20, 2008
    When I run <cfdump var="#cgi#"> I don't see any variable called CGI.HTTP_REMOTE_USER. But then again I am on CF 8.

    My advice is to change all occurrences of CGI.HTTP_REMOTE_USER to CGI.REMOTE_USER. Tools like Eclipse and Homesite have facilities that will enable you to do the 500 pages in a matter of minutes.

    Get the problem out of the way, once and for all. There might come a time when you will be thinking of moving from MX7 to CF8.

    Inspiring
    April 20, 2008
    Paul Har wrote:
    > We've got about 500 Cold Fusion version 6.1 pages that use the variable
    > CGI.HTTP_REMOTE_USER. One of our folks set us up a test server and installed

    not that i know much about web server authentication but isn't that var only
    populated when the page *doesn't* have anonymous access allowed?
    Participant
    April 22, 2008
    Sounds like you know more about web server authentication than I do. This is interesting. I do know that when the test server was set up it was NOT configured to require a UID/Password login. This was changed later (in IIS?) but that was AFTER ColdFusion 7 was installed. I'm referring your message to our server admin. Any other advice to share? Thanks much.