[Klone-users] kl1 as CGI
ripar
riparz at gmail.com
Thu Jun 4 08:23:28 EDT 2009
Hi to all,
I'm really going mad. I've two file: index.html e prova.kl1, that I want to
call as a simple CGI. In fact, I would like to use klone as a normal web
server but i want to keep the C language power for scripting.
----------------------- Index.htm -------------------------------
<HTML>
<BODY>
BLA....BLA.....BLA
<FORM METHOD="GET" ACTION="cgi/prova.kl1">
<p>Type something here: <INPUT NAME="nameoffield"></p>
<p>INPUT TYPE="SUBMIT"></p>
</FORM>
</BODY>
</HTML>
------------------ prova.kl1-------------------------
#!/mnt/flash/klone
<body>
PROVA 10
<%
io_printf(out, "PIPPO");
DIR *dirp;
struct dirent *dp;
dirp = opendir("/");
while ((dp = readdir(dirp)) != NULL)
io_printf(out, "<li>%s</li>", dp->d_name);
closedir(dirp);
%>
</body>
---------------------------------
I've compiled with --install_daemon_only e --ebable_sup_cgi, but when I call
the script the resulting page it's always blank. Which interpreter I've to
use (klone?)? Is it native the c language interpretation?
Please, I'm really going mad..... can give some working example?
Thanks a lot
Mauro
2009/6/3 ripar <riparz at gmail.com>
> Hello Thomas,
> thanks a lot for your info. I've compiled the kloned deamon as your
> indication and changed the kloned.conf file. Anyway, I can see simple html
> files but when I tray to call a kl1 file the only one i can see is a blank
> page.
>
> Do you have some example of kl1 files usage?
>
> Thanks a lot
> Mauro
>
> 2009/6/3 thomas fossati <tho at koanlogic.com>
>
> Hi Mauro,
>>
>> On Jun 2, 2009, at 6:18 PM, ripar wrote:
>>
>>> I would like tu use C code (in Kl1 file) ad simple (and not embedded) cgi
>>> script. To do this, I've compiled the klone as act as a normal web server.
>>> Is it possible?
>>>
>>
>>
>> yes, you need to add "KLONE_CONF_ARGS += --enable_sup_cgi" to your
>> Makefile and a minimal "cgi" section to the backend configuration in your
>> kloned.conf file (see
>> klone-2.2.0/build/target/klone-core-2.2.0/etc/kloned-cgi.conf).
>>
>> ciao, t.
>>
>> _______________________________________________
>> Klone-users mailing list
>> Klone-users at koanlogic.com
>> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090604/de754e6f/attachment.html
More information about the klone-users
mailing list