Session Variable Username

March 18, 2002 by Andrew Watson

Just a wee point, The session variable username is only called MM_Username if you use the stock UD login behaviour, its not generic to ASP, it can be called anything in the whole wide world....

<%= Session("svWellillbedamnedifthisaintmysessionvariableusername") %>

 

Leed

OK????

March 18, 2002 by Bill Chalmers
While this is true the stock restrict access to page and other built in user authentication features do request the stock variable name so it may be wise to use this unless you are doing your own hand coding and want to explicitly create your own session variables and build your own user authentication pages.

Something to be aware if usinh PHP on a Windows platform

April 19, 2002 by Mark Pawson

If you experience problems that new SID's are being created after using phakt / impakt code then this may prove a solution. - Thanks to Cirstoiu & the Interakt team for providing prompt feedback to all emails sent whilst discovering the solution.

NOTE: This is a Windows problem.

When transmitting session variables from one page to another you have to transmit the session ID first. There are three ways to do this:

1. session ID is transmitted automatically by the server when session.use_trans_sid = 1  (set in php.ini)
2. session ID is store in a cookie when session.use_cookies = 1  (set in php.ini)
3. session ID is transmitted manually by the user in the URL

In my set-up I had set session.use_trans_sid = 1 and session.use_cookies = 0 , BUT under the Windows environment session.use_trans_sid = 1 doesn't work. Therefore when calling session_start in another page the session ID is unknown and another session is created.

To resolve this problem you need to set session_set_cookies = 1

****NOTE****
session.use_trans_sid does not work under windows.