Hi to all,<br>I&#39;m really going mad.  I&#39;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>&lt;HTML&gt;<br>&lt;BODY&gt;<br><br>BLA....BLA.....BLA<br><br>&lt;FORM METHOD=&quot;GET&quot; ACTION=&quot;cgi/prova.kl1&quot;&gt;<br>&lt;p&gt;Type something here: &lt;INPUT NAME=&quot;nameoffield&quot;&gt;&lt;/p&gt;<br>
&lt;p&gt;INPUT TYPE=&quot;SUBMIT&quot;&gt;&lt;/p&gt;<br>&lt;/FORM&gt;<br><br>&lt;/BODY&gt;<br>&lt;/HTML&gt;     <br><br>------------------ prova.kl1-------------------------<br>#!/mnt/flash/klone<br><br><br>&lt;body&gt;<br>
PROVA 10<br>&lt;%<br>      io_printf(out, &quot;PIPPO&quot;);<br>  <br>    DIR *dirp;<br>    struct dirent *dp;<br><br>    dirp = opendir(&quot;/&quot;);<br>    while ((dp = readdir(dirp)) != NULL)<br>        io_printf(out, &quot;&lt;li&gt;%s&lt;/li&gt;&quot;, dp-&gt;d_name);<br>
    closedir(dirp);<br>%&gt;<br><br>&lt;/body&gt;<br>---------------------------------<br><br>I&#39;ve compiled with --install_daemon_only e --ebable_sup_cgi, but when I call the script the resulting page it&#39;s always blank. Which interpreter I&#39;ve to use (klone?)? Is it native the c language interpretation? <br>
<br>Please, I&#39;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">&lt;<a href="mailto:riparz@gmail.com">riparz@gmail.com</a>&gt;</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&#39;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">&lt;<a href="mailto:tho@koanlogic.com" target="_blank">tho@koanlogic.com</a>&gt;</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&#39;ve compiled the klone as act as a normal web server. Is it possible?<br>
</blockquote>
<br>
<br></div>
yes, you need to add &quot;KLONE_CONF_ARGS += --enable_sup_cgi&quot; to your Makefile and a minimal &quot;cgi&quot; 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>