[Lazarus] fpWeb & fcgi

Lee Jenkins lee at datatrakpos.com
Sat May 14 22:52:53 CEST 2011


On 5/14/2011 4:14 PM, Joost van der Sluis wrote:
> 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.

fppkg install embweb

When it didn't work the first time, I also tried fppkg download embweb before 
fppkg install embweb, but the result was the same.

>
>> 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?

Odd.  That is what I did after your first reply to my original post.  I 
downloaded and installed the latest snapshot "Lazarus + fpc 2.4.3" for Win32 
from here: http://www.hu.freepascal.org/lazarus/

>> 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.
>

OK.  DOM_HTML looks pretty useful though.  There seems to be some overlap in 
functionality of the two units (dom_html and htmlelements).

Thanks again!

--
Warm Regards,

Lee





More information about the Lazarus mailing list