fcl-web and session lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- thierrydijoux · 2013-01-03 17:05 Hi, i'm fighting with session in a cgi with fcl-web (lazarus 1.1 and fpc 2.7.1. When there is one web module, all is ok. When adding a second modules, the session is not shared, even when SessionCookiePath is set. Worse, on the first module, a new session is created each time the cgi is called. If someone has some tips... It gave me a headache. Thanks in advance ---------------------------------------------------------------------- bobo · 2013-01-03 19:32 I am not using the built-in cookie sessions with fcl-web (using the in-url session tracking method personally), but asked Michael Van Canneyt (one of the fpc developers) about this: "Modules and session are not related at all.  I use many many modules, and never had a problem.  Maybe the 'CreateSession' variable is different for each module ? He should try checking the cookies being sent between server and browser..." So this should not be a bug, just needs some debugging it seems. This can be a little tiresome with web apps, but with using log files it is possible. ---------------------------------------------------------------------- thierrydijoux · 2013-01-04 08:45 Thanks bobo, you show me the way ant it works now ! I've attached a sample project if someone need to deal with session. ---------------------------------------------------------------------- devEric69 · 2020-06-08 10:43 (old post - 7 years ago - i know, but for information, fortunately I don't have this problem anymore due to the line below, in iniwebsession.pp, allowing to assign TCookie.path with '/': Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i C.Path:=SessionCookiePath; See https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl- web/src/base/iniwebsession.pp?view=log )