Is is possible to abandon apachi/cgi for fphttpserver? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Michael Collier · 2013-03-09 15:34 Hi, Is it possible to replace an Apache & CGI combination with purely FPWeb components? My current configuration uses TWebModule to manage Session information ( Session.SessionID ) which is fundamental to how my application works, I'm not sure if there is something similar available if I use, say, TFPHTTPServer on its own? I'm assuming that TWebModule is only available in a CGI environment, or am I wrong? Is it possible to use something like TFPHTTPServer & TWebModule together with no Apache? Apart from the Session.SessionID info I think I can go ahead and use TFPHTTPServer on its own, I would just handle the TFPHTTPServer.HandleRequest event to process the actions that the TWebModule would otherwise handle. Is that correct, or is there an easier way? So I think it's just the Session part that would be missing? Is that right? Thanks in advance ---------------------------------------------------------------------- Leledumbo · 2013-03-10 00:36 QuoteHi, Is it possible to replace an Apache & CGI combination with purely FPWeb components?Yes QuoteMy current configuration uses TWebModule to manage Session information ( Session.SessionID ) which is fundamental to how my application works, I'm not sure if there is something similar available if I use, say, TFPHTTPServer on its own?Yes QuoteI'm assuming that TWebModule is only available in a CGI environment, or am I wrong?No QuoteIs it possible to use something like TFPHTTPServer & TWebModule together with no Apache?Yes QuoteApart from the Session.SessionID info I think I can go ahead and use TFPHTTPServer on its own, I would just handle the TFPHTTPServer.HandleRequest event to process the actions that the TWebModule would otherwise handle. Is that correct, or is there an easier way?If you use fpWeb structure, changing uses clause (and probably setting server port) in the .lpr is enough, all other code should stay the same. QuoteSo I think it's just the Session part that would be missing? Is that right?No, FPHTTPServer supports it ---------------------------------------------------------------------- Michael Collier · 2013-03-15 12:10 Thanks, it works now  I used an example from here http://opensoft.homeip.net:8080/articles/webserver1.pdf to make the http server run in its own thread so it can be started/stopped and can also host the server within a gui application that repsonds to mouse and keyboard messages. I thought I'd post the link to it here because I didn't spot this approach in the demos? ..I added one of my existing webmodules for CGI and all is ok. I'd be happy to post the project here if anyone is interested in looking at it, it may be useful to others and I'd appreciate the peer review an case there is a better way of doing things, but either way it seems to work, thanks again ---------------------------------------------------------------------- BigChimp · 2013-03-15 12:15 Quote from: Michael Collier on March 15, 2013, 01:10:22 pmI'd be happy to post the project here if anyone is interested in looking at it, it may be useful to others and I'd appreciate the peer review an case there is a better way of doing things, but either way it seems to work, thanks again Yes, thanks - other ways of doing things are always welcome. Especially if they can help with debugging cgi problems