Using KonsolScript for CGI

I was bored one time and tried to hack Apache on my Ubuntu box to use Quixie as CGI. It turned out, I didn’t have to do much of hardcore hacking to make it work.

Hello CGI

Here are the steps of what I did:
1. Make sure you already have apache
  sudo apt-get install apache2

2. Copy quixie to cgi-bin
  cp ./quixie /usr/lib/cgi-bin/

3. For testing, change permission of cgi-bin
  cd /usr/lib/
  sudo chmod 655 cgi-bin

4. Make test file, named main.ks
  function main() {
    Konsol:Log("Content-type: text/html\n\n")
    Konsol:Log("Kisi says, <strong>Hello CGI!</strong>")

5. Place main.ks in cgi-bin directory
  sudo cp ./main.ks /usr/lib/cgi-bin/

6. Make sure apache service is running
  sudo /etc/init.d/apache2 start

7. Access Quixie from your browser. …viola!

This is not to show that KonsolScript is going to compete in other CGI technologies like Perl, Python, PHP, etc. This is just to show that the KonsolScript engine, Quixie, is at the point of being usable — though further development is needed to fully support CGI.

Using KonsolScript for CGI on Windows should have almost the same steps.

Mj Mendoza IV
KonsolScript Developer

Tags: ,