Has anyone ever experienced session variables not getting set.

I have created a login page like so,

<cfif isdefined("form.uid") and isdefined("form.pwd")>
                <cfquery name="checkLoginUser"
datasource="#application.dsn#" username="sa" password="ruler">
                SELECT    uid, pwd
                FROM      dbo.Users
                WHERE     (uid = '#form.uid#') and (pwd = '#form.pwd#')
                </cfquery>
                        <cfif checkLoginUser.recordcount eq 1>
                                <cflock scope="session" type="EXCLUSIVE"
timeout="30">
                                        <cfset session.checkLoginUser = 1>
                                        <cfset session.LoginUser =
#checkLoginUser.uid#>
                                </cflock>
                                <cflocation
url="#application.secureVirtualRoot#admin/control.cfm" addtoken="No">
                        <cfelse>
                                <cflock scope="session" type="exclusive"
timeout="30">
                                        <cfset session.checkLoginUser = 0>
                                </cflock>
                        <tr><td bgcolor="#ebebeb" class="main">&nbsp;<font
color="#ff0033">Sorry!</font> but your <b>login</b> details &nbsp;are
<b>incorrect</b> please check!</td></tr>
                        </cfif>
</cfif>


My application file is between the directories in a directory named secure,
and is like so

<cfinclude template="../../application.cfm">
<cfif isdefined("session.checkLoginUser")>
        <cfif session.checkLoginUser neq 1>
                <cflocation
url="#Application.virtualRoot#coolcross/index.cfm" addtoken="No">
        </cfif>
<cfelse>        
        <cflocation addtoken="No"
url="#Application.virtualRoot#coolcross/index.cfm">
</cfif>

When I login through my own client its successfull, the session variable is
set.
If I login on the webserver it is also successful.

If I login on any other client the session never gets set.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to