[Lazarus] fpWeb & fcgi

Joost van der Sluis joost at cnoc.nl
Sat May 14 22:14:46 CEST 2011


On Sat, 2011-05-14 at 13:13 -0400, Lee Jenkins wrote:
> On 5/9/2011 6:48 AM, Joost van der Sluis wrote:
> > On Sun, 2011-05-08 at 23:41 -0400, Lee Jenkins wrote:
> >> I have a web type project coming up and decided to poke around in the fpWeb
> >> stuff.  My, you guys have been busy, I never took a good look around the
> >> fpweb/laz web sources till today.  I was thinking of using php with symfony or
> >> one of the smaller frameworks, but its a bit overkill for my project.  I'm
> >> considering using fpweb/lazarus so I'm writing a small test application.
> >>
> >> I thought I saw mention of a embedded web server available?  I currently have a
> >> pretty simple embedded server using synapse that is a modified version of the
> >> demo that comes with the sources.  I was thinking of writing a
> >> TCustomWebApplication to use that.  But I did remember somewhere in a recent
> >> thread, there was mention of an existing embedded server...?
> >
> > fppkg update
> > fppkg install embweb
> > restart Lazarus
> > In Lazarus->install packages->  select embweb->  install
> >
> 
> I tried that with the latest snapshot and it spat out an AV.  I guess the FPC 
> 2.4.3 doesn't work for that?

On which command? It's possible to get this working on fpc 2.4.3, but I
won't bother.

> The problem is that I'm on Windows and its such a bear to setup Lazarus/FPC to 
> compile from sources, at least in my limited experience in doing it.

Just download a lazarus snapshot?

> 4) What is the protocol for using a restful type url like this?
> 
> http://mysite.com/module-name/function-name/var1/var2/var3

You van use 'GetNexPath' to get the next 'parameter' in the URL.

> 5) For those instances where I need to build a page or fragment of html through 
> code, which unit is recommended?  There seems to be some overlap between 
> fcl-xml/dom_html.pp and fcl-xml/htmlelements.pp.

I always use htmlelements and the htmlwriter. 

Joost.





More information about the Lazarus mailing list