Or does anybody have other HTTP Server example code in Lazarus/Freepascal? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- pascalbythree · 2017-04-18 19:23 :-) Now working my hours on a lazarus CGI to see weither that can be a solution :-) ---------------------------------------------------------------------- Blestan · 2017-04-18 19:30 hi! im actulay developing api backend ... the idea is to have pascal http server behing ha-proxy terminating ssl and round robin loadbalance to many pascal servers ... servers are multithreded...  interested? i will create a repo next few days ... ---------------------------------------------------------------------- Thaddy · 2017-04-18 19:53 example: 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 program cgiexample;begin writeln(now);end. Sorry, that's all I can find to make cgi simpler .... ---------------------------------------------------------------------- BeniBela · 2017-04-18 22:08 Quote from: Thaddy on April 18, 2017, 09:53:48 pmexample: 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 program cgiexample;begin writeln(now);end. Sorry, that's all I can find to make cgi simpler .... Can that work without a writeln('Content-Type: text/html'); writeln; first? ---------------------------------------------------------------------- Leledumbo · 2017-04-19 04:52 Quote from: BeniBela on April 19, 2017, 12:08:59 amCan that work without a writeln('Content-Type: text/html'); writeln; first? I don't think so, at least chrome expects it. No idea about other browsers (or what the standard mandates). ---------------------------------------------------------------------- pascalbythree · 2017-04-19 09:35 Thaddy, where must i place the executable to run in de webserver? The test APP seems to pop-up with de file download. PS Second Question: Does anybody have http component for Lazarus that can stuff strings with writeln or the classfarme work Message procedures. Instead of working with files. Greets, Wouter ---------------------------------------------------------------------- Phil · 2017-04-19 14:25 Quote from: pascalbythree on April 19, 2017, 11:35:36 amThaddy, where must i place the executable to run in de webserver? The test APP seems to pop-up with de file download. What server and OS are you using? With IIS, you need to enable the executable. See notes here for how to do that with an FCGI executable: https://macpgmr.github.io/MacXPlatform/PascalDynLibs_4.html#Windows ---------------------------------------------------------------------- pascalbythree · 2017-04-19 15:10 I am using a Raspberry Model 3 on Raspbian Jessie with PIXEL 2017-04-10 Anybody help on Linux? Howto execute the FPC application through the socket? Preffered Lighttpd, otherwise Apache2 also will do fine. ---------------------------------------------------------------------- Leledumbo · 2017-04-19 16:18 Quote from: pascalbythree on April 19, 2017, 05:10:44 pmI am using a Raspberry Model 3 on Raspbian Jessie with PIXEL 2017-04-10 Anybody help on Linux? Howto execute the FPC application through the socket? Preffered Lighttpd, otherwise Apache2 also will do fine. No idea about lighttpd, but apache should have cgi support built-in. Just put it wherever your apache config accepts cgi executables (read its documentation if you have no idea). ---------------------------------------------------------------------- Phil · 2017-04-19 16:45 Quote from: Leledumbo on April 19, 2017, 06:18:36 pmJust put it wherever your apache config accepts cgi executables (read its documentation if you have no idea). Somewhere like /var/www/html And make sure Apache is running, for example: sudo service apache2 restart