We have a working code for CGI1.2 for ICS. It's in pascal and used in IQWF
Server (http://www.fastream.com/iqwebftpserver.php). You may contact me
privately for this (gates AT fastream DOT com).

Regards,

SubZero
On Mon, Feb 28, 2011 at 4:18 PM, A Drent <albert.dr...@rug.nl> wrote:

> Hi Francois,
>
> I am/was using your THttpServer component. I'll try your approach of using
> the HttpAppSvr component though. Don't have much experience with pipes, but
> there are a lot of samples regarding this. I will let you know how I
> progress, it might be nice to others too.
>
> tnx, Albert
>
>
> ----- Original Message ----- From: "Francois PIETTE" <
> francois.pie...@skynet.be>
> To: "ICS support mailing" <twsocket@elists.org>
> Sent: Monday, February 28, 2011 3:13 PM
>
> Subject: Re: [twsocket] THttpWebserver and php
>
>
> btw: I answered assuming you are using THttpAppSrv component, but looking
>> at your subject, maybe you are using THttpServer component. I suggest you
>> use the former which is more powerful and easier.
>>
>> --
>> francois.pie...@overbyte.be
>> The author of the freeware multi-tier middleware MidWare
>> The author of the freeware Internet Component Suite (ICS)
>> http://www.overbyte.be
>>
>>
>> ----- Original Message ----- From: "Francois PIETTE" <
>> francois.pie...@skynet.be>
>> To: "ICS support mailing" <twsocket@elists.org>
>> Sent: Monday, February 28, 2011 2:39 PM
>> Subject: Re: [twsocket] THttpWebserver and php
>>
>>
>> Hi Albert,
>>>
>>> I found some entries regarding this issue, but could not find a
>>>> sufficient answer. If I want to use the ICS webserver to facilitate a php
>>>> program (I don't mind invoking php as a cgi in my case) what's the best
>>>> approach. Has someone done this before?
>>>>
>>>
>>> I never done it before, but at first glance, invoking a CGI from an ICS
>>> webserver application is not difficult. Invoking a CGI require the following
>>> actions:
>>> 1) Create a lot of environment variables with informations about server,
>>> client and request
>>> 2) Create pipes for input and output
>>> 3) Create the CGI process with I/O redictions to the pipes
>>> 4) Write the client request into the pipe redirected to CGI input
>>> 5) Read the pipe used for CGI output redirection until the CGI exit
>>> 6) Send the data read from the pipe to the client as the answer to the
>>> request.
>>>
>>> A single TUrlHandlercan do all of that, probably creating a worker thread
>>> to read/write the pipes and launch de CGI executable.
>>> CGI specifications can be found here: http://www.w3.org/CGI/
>>>
>>> Now executing a request implemented as a PHP script involve deriving form
>>> TUrlHandler handler above and executing PHP interpreter configured as a CGI.
>>>
>>> I hope this helps.
>>> --
>>> francois.pie...@overbyte.be
>>> The author of the freeware multi-tier middleware MidWare
>>> The author of the freeware Internet Component Suite (ICS)
>>> http://www.overbyte.be
>>>
>>> --
>>> To unsubscribe or change your settings for TWSocket mailing list
>>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
>>> Visit our website at http://www.overbyte.be
>>>
>>
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>>
>>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to