Oh, and did I mention that since this not supported functionality, it's possible that the format of _fwsession may change in a future release? We don't currently plan any changes in this area, but I do need to warn you that it's always possible.
By the way, another option would be to use a 3rd party session management tool, that could be shared by multiple environments, or write your own. There used to be a product named SA Session-Pro, but it no longer exists. I'm not sure what else is out there these days.
|FoxWeb Support Team
Sent by FoxWeb Support on 05/12/2008 10:29:39 PM:
Theoretically this is possible, but it may not be worth the amount of work it would take. Also, note that what you are trying to do is not supported functionality, so we are not going to be able to provide too much support.
Session data is stored in a FoxPro table, named _fwsession, in the temp directory. Variables for each session are stored in a single record, using the SAVE MEMO command. Records are keyed by the session id, which can be found in a cookie, named "FW_SessionID". Each session variable is stored in a different row in an array named SessionVars.
It's possible to access DBF files from ASP and PHP (just use the VFP OLE DB provider), but you would also have to find a way to reproduce the functionality of the RESTORE MEMO command. I don't know if the format in which VFP writes variable data to files, or memo fields was ever made public by MS. Another possibility would be to create a COM server in VFP, with methods that read and decode data from _fwsession. With additional work, you could even write session data back to it, but you will need to be super careful with how you lock the table. FoxWeb's session object is very sophisticated in this area and ensures that there are no collisions when multiple channels try to simultaneously write to the same record (which happens pretty often for sites that utilize frames).
|FoxWeb Support Team
Sent by jc clerc on 05/12/2008 03:01:12 AM:
Can I allow access to the foxweb session objects auth.userid, Session.GetSessionID() or session.getvar("dateopen") ... to an application done in PHP or ASP.
What I do today is send the sessionid into a hidden form or directly into the hyperlink. In the mean time I save all the session datas into a temporary sql cursor so this allow to path thru datas from one language to another. On the other language side they do exactly the same so I get it back in Foxweb recreating my session objects. It works fine but it is a little heavy to program.
This question is due to the fact that I work with programmers using other plateform on the same server so it would be 100% times easier to access directly calling the session objects in a common way.
I have tried to open the _fwsession.dbf table but it is hard to read datas.
"Thanks for Foxweb-VFP it is a great solution"
(When I see the time it takes for the others to create a clean application with a report in PDF !!!).