View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Thank you for yours answer. I realy appreciate. With this I thnik I have found my problem but I still don't understand why it happenig. Here some information.
 
In all my PRG I use the variable "http://<<CGI.ServerName>>" to call the path fully qualified URLs. But on your advice I have change this for absolute "/cgi-bin/foxweb.exe/..." when I use redirect.
 
I will give you my URL in blod and the content of my html page in italic.
 
First page - no foxweb
 
Submit form Action="/cgi-bin/foxweb.exe..."
Username local : jfmathieu
Username session : jfmathieu
Company local : 3webmedia
Companu session : 3webmedia
 
So with this I khow tha my session work's and that the value are in.
 
After 5 sec the page redirect with META to
 
So the path for redirect still "/cgi-bin/..." but with 2 parameter. My page after this disoplay this
 
Message:
Access restricted!
Combinaison Username and Company not found.
Technical info:
*Company:
*Username:
*Code: jfmathieu
*ParamID: 0WN13BIT31 
*SessionID: 0WN13BMVP1   
 
Beceause the session is not found !!!  And you can see that the ParamID that is the SessionID in the first pass of fw_enter with Login.prg and the SessionID that is the sessionID in the seconde pass with fupage.prg are not the same. But I have made the change to absolute link and the server name doesn't change.
 
Thank for your help I really appreciate  
 
Sent by FoxWeb Support on 03/14/2003 11:08:20 PM:
Sessions are keyed off of a cookie called FW_SessionID.  One characteristic that cookies have is that they will only be sent to the server that originally sent them to the browser.  The way that browsers identify a server is by the server name in the URL.  If the server name changes, then the cookies received by the browser in previous calls are not sent.
 
If two server identifiers point to the same server, but are not exactly the same (for example localhost and 127.0.0.1, or foxweb.com and www.foxweb.com), the browser will still regard them as different servers.  This is why you should never use fully qualified URLs in your links and redirect statements, unless you are sending the user to a different server.
 
You mention that the cookie disappears after a redirection.  Does your redirect tag specify a fully qualified URL, including a server name?  This is not necessary  -- you only need to use an absolute, or a relative URL, as described in the Locating and Addressing Scripts chapter of the FoxWeb documentation.
 
One way to diagnose such problems is to compare the Session ID before and after the redirection.  If they are different, then the reason is most probably caused by a change in the server name.

FoxWeb Support Team
support@foxweb.com email

Sent by Jean-François Mathieu on 03/14/2003 06:27:44 AM:
Hi,
I have a problem with the session objet that seem to not take the value that I give to it or  only take it when he whan.
 
I whan to use Session Object to be like Auth Object so I have made function to Login, Logout, SetTimeOut... etc... Variable Uername, LoginTime...
 
Here' how it's work for me:
foxweb.exe call Login?Usename=1&Password=1&Login=1
 
In fw_enter I check if the user have login=1. If yes I bypass the validation and return to Login.prg
 
In Login the user is validate and if everyting is ok then i use the code:
Session.SetVar("User") = lcUsename
..
..
And I have check and the variable are not empty.
 
After the program redirect by HTML META tag to the second module Enter.prg
 
Agains we pass in fw_entre but now Login = "" so a validate if the Session Object have the information Username, LoginTime but it's don't so I'm not login and "kick out". When I check with de fwx that came with foxweb the session variable has noting in except the cookie id, no lasthit, no variable.
 
If I try a few time with the same session sometime it's pass !
 
The worst is that in fw_enter I have made the code IF Login = 1 then Session.SetVar("allo","oui") and made write this at the end on Login and it's work but the other value don't pass.
 
Can somebody help.
 
Thank for your help
The problem is the the user is found but the code for the session don't seems to work.