Hi to all,<br>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.<br>
<br><br>----------------------- Index.htm -------------------------------<br><HTML><br><BODY><br><br>BLA....BLA.....BLA<br><br><FORM METHOD="GET" ACTION="cgi/prova.kl1"><br><p>Type something here: <INPUT NAME="nameoffield"></p><br>
<p>INPUT TYPE="SUBMIT"></p><br></FORM><br><br></BODY><br></HTML> <br><br>------------------ prova.kl1-------------------------<br>#!/mnt/flash/klone<br><br><br><body><br>
PROVA 10<br><%<br> io_printf(out, "PIPPO");<br> <br> DIR *dirp;<br> struct dirent *dp;<br><br> dirp = opendir("/");<br> while ((dp = readdir(dirp)) != NULL)<br> io_printf(out, "<li>%s</li>", dp->d_name);<br>
closedir(dirp);<br>%><br><br></body><br>---------------------------------<br><br>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? <br>
<br>Please, I'm really going mad..... can give some working example?<br><br>Thanks a lot<br>Mauro<br><br><br><br><br><br><br><br><div class="gmail_quote">2009/6/3 ripar <span dir="ltr"><<a href="mailto:riparz@gmail.com">riparz@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Thomas, <br> 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. <br>
<br>Do you have some example of kl1 files usage?<br><br>Thanks a lot<br>Mauro<br><br><div class="gmail_quote">2009/6/3 thomas fossati <span dir="ltr"><<a href="mailto:tho@koanlogic.com" target="_blank">tho@koanlogic.com</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Mauro,<div><br>
<br>
On Jun 2, 2009, at 6:18 PM, ripar wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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?<br>
</blockquote>
<br>
<br></div>
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).<br>
<br>
ciao, t.<br>
<br>
_______________________________________________<br>
Klone-users mailing list<br>
<a href="mailto:Klone-users@koanlogic.com" target="_blank">Klone-users@koanlogic.com</a><br>
<a href="http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users" target="_blank">http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users</a><br>
</blockquote></div></div></div><br>
</blockquote></div><br>