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