[fpc-pascal] How to use FCGI?

Joost van der Sluis joost at cnoc.nl
Wed Jul 15 11:01:29 CEST 2009


Op maandag 13-07-2009 om 11:07 uur [tijdzone +0200], schreef Artur
StuczyƄski:
> OK, thanks, got it working.
> 
> Please correct me, if I am wrong, but this approach makes developing and debugging harder, because it is httpd which spawns the application, so to effectively kill the app and replace it with new build I have to restart the httpd (at least with lighttpd which I tested).
> 
> I see possible resulutions:
> 
> 1. Create the application as a standard CGI and convert it to FCGI on deployment
> or
> 2. Make TCustomFCGIApplication's descendant and replace WaitForRequest with own code which binds, listens and accepts connections from httpd. Then, upon compilation, I need only to restart my application.
> 
> Am I right?

Easiest is to use the embedded-web-server I've send to this list a month
ago. That way you can debug from within the Lazarus-ide. When you deploy
your application, you can compile as FastCGI. (Switch one unit in your
uses-clausule and you're done)

Joost.




More information about the fpc-pascal mailing list