site  contact  subhomenews

Quisp v128

August 01, 2009 — BarryK
I am taking another look at Quisp and the backend Shsql. As these web-interface applications can be tricky sometimes to setup, I have documented every step.

Another thing that I had to sort out is that the author designed the compiling in such a way that a library libshsql.a gets linked statically with 14 executables, resulting in a much larger than necessary package. I told the author about this in 2004, version 126, but he has not changed it to use a shared library. So, below is a script I have written that recompiles the executables to use a shared libshsql.so library file:

Compiling

# make

Which creates executables in 'bin' and static library file in 'lib' in the source folder.

I have created a script, to be run after compiling, that recompiles to use a shared 'libshsql.so':

#!/bin/sh

#Barry Kauler
#after compiling quisp, run this script.

cd sqlsrc

SQLOBJ='shsqlconfig.o api.o sqlcom.o sqldel.o sqlins.o sqlsel.o sqlupd.o indexlook.o tablelock.o recordlock.o sequence.o general.o'

TDOBJ='condex.o err.o fieldmap.o glroutines.o tdhkit.o value_subst.o variable.o value.o containswords.o'

ld -shared -o libshsql.so $SQLOBJ $TDOBJ

cp -f libshsql.so ../lib/
cp -f libshsql.so /usr/lib/

#do i really need '-lm'?...
gcc shsql.o -o ../bin/shsql -lshsql -lm
gcc shsql_join.o -o ../bin/shsql_join -lshsql -lm
gcc shsql_create.o -o ../bin/shsql_create -lshsql -lm
gcc shsql_alter.o -o ../bin/shsql_alter -lshsql -lm
gcc tabmaint.o -o ../bin/tabmaint -lshsql -lm
gcc buildix.o -o ../bin/buildix -lshsql -lm
gcc tabdef.o -o ../bin/tabdef -lshsql -lm
#note the change of name...
gcc fldsel.o -o ../bin/shsql_fldsel -lshsql -lm
gcc tabo.o -o ../bin/tabo -lshsql -lm
gcc dataedit.o -o ../bin/dataedit -lshsql -lm
gcc catofs.o -o ../bin/catofs -lshsql -lm
gcc dbcat.o -o ../bin/dbcat -lshsql -lm

cd ..
cd qsrc
#these two got removed by the Makefile so have to recompile...
gcc -DTDH_DB=2 -Wall -c -o quisp.o quisp.c
gcc -DTDH_DB=2 -Wall -c -o cgiops.o cgiops.c
gcc quisp.o oplist.o cgiops.o cgic.o variable.o value_subst.o value.o times.o tdhkit.o sqlbuild.o sinterp.o shell.o secondaryops.o reslimits.o glroutines.o functions.o fieldmap.o err.o dbinterface.o dbfunc.o dates.o containswords.o condex.o checksum.o custom.o -lshsql -lm -o ../bin/quisp
gcc -DTDH_DB=2 -Wall -c -o quisputil.o quisputil.c
cc quisputil.o variable.o value_subst.o value.o times.o tdhkit.o sqlbuild.o sinterp.o shell.o secondaryops.o reslimits.o glroutines.o functions.o fieldmap.o err.o dbinterface.o dbfunc.o dates.o containswords.o condex.o checksum.o custom.o oplist.o -lshsql -lm -o ../bin/quisputil

cd ..
strip --strip-unneeded ./bin/*
strip --strip-debug ./lib/libshsql.so
sync


Installation
I copied the executables to /usr/bin, libshsql.so to /usr/lib

# su -c newproject.sh webuser
Welcome to quisp/shsql project setup script.

Instructions are available at
http://quisp.sourceforge.net/qman/html/support.html

Preparing to create a quisp/shsql project directory...

Enter full path name for your project directory:
/root/Web-Server/Quisp

# export SHSQL_DB='/root/Web-Server/Quisp'


Open /root/Web-Server/Quisp/config in a text editor, change these lines as shown: UPDATED:

dbbin: /usr/bin // dir where shsql executables reside, or 'path'
varvalue: HTMLPATH=/root/Web-Server // pathname location of your local html directory
varvalue: CGIPROG=/cgi-bin/quisp.bin // URL location of your quisp executable (or equivalent)


Finish setting up so that 'quisp' can run as a CGI: UPDATED:

# su -c 'mkdir /root/Web-Server/cgi-bin' webuser
# cp /usr/bin/quisp /root/Web-Server/cgi-bin/quisp.bin
# chown webuser:webgroup /root/Web-Server/cgi-bin/quisp.bin
# chmod 6755 /root/Web-Server/cgi-bin/quisp.bin
# ln -s ../Quisp/config /root/Web-Server/cgi-bin/quisp.bin.cnf
# chown -h webuser:webgroup /root/Web-Server/cgi-bin/quisp.bin.cnf


Testing
I have tested with 'nullhttpd', Quisp works. I don't know how to tell Hiawatha to use a binary executable as a CGI program -- the Hiawatha config file seems only to be designed to cater for Perl or PHP scripts -- I'll have to ask the Hiawatha developer. Stay tuned.

Comments

Quisp and Hiawatha
Username: BarryK
I posted a question to the Hiawatha forum: http://www.hiawatha-webserver.org/forum/topic/249 'Prit' has responded, informed me of an earlier answer from Hugo Leisink. This must be the same Prit that we know! Good, it looks like there are three different ways to solve the problem: 1. rename the 'quisp' executable, to say 'quisp.bin' and set CGIextension=bin 2. Set NoExtension variable. 3. URL rewriting.

Quisp in 2004/5/6
Username: BarryK
"A bit of background for anyone interested. I introduced Quisp into Puppy quite some time ago, back in the Puppy 1.x days I think. There was limited interest. One person, 'thoughtjourney', setup a complete website using Quisp. Also 'Keith Silva' was into using Quisp. Here are some forum threads: http://www.murga-linux.com/puppy/viewtopic.php?t=11 http://www.murga-linux.com/puppy/viewtopic.php?t=18060 http://www.murga-linux.com/puppy/viewtopic.php?t=17134 http://www.murga-linux.com/puppy/viewtopic.php?t=354 I took Quisp out of Puppy quite some time ago also , but I am still of the opinion that there is great potential here. A very small product, yet very capable, designed for networking, and as thoughtjourney commented, creating web page frontends is fairly easy. I think that there is great potential for us to develop some kind of GUI development tool. Quisp homepage: http://quisp.sourceforge.net/qman/html/quisp_home.html Another comment from thoughtjourney is that there is excellent documentation. Yes there is. Whatever happened to thoughtjourney? She wrote our excellent JWMconfig application. She got married, then had a baby, reported that her new lifestyle meant that she would not be so involved in Puppy anymore.

dialog
Username: kirk
"Barry, The 'dialog' utility that Puppy uses, is it patched? When ever I compile it, things like the xorgwizard or rc.shutdown show up black and white. Maybe some configure option I'm missing? Thanks, Kirk

dialog
Username: BarryK
"kirk, are you using the right source? There are various places it can be downloaded from, but this is where I get it from: http://invisible-island.net/dialog/ Looking back quickly through my notes, I see when I compiled it back in 2006, I configured it like this: # ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu --disable-nls --with-ncurses I did not patch it.

dialog
Username: kirk
"Yes, that where I got it from. I haven't tried it with --disable-nls yet. I'll give it a go. Not a real big deal anyway. Thanks again.

Date bug in PPLOG
Username: drongo
"32 July? Is this anything to do with timezones?

Gtk Theme Stardust
Username: Arby
"Hey, I noticed the Stardust theme is no longer present. Is there some technical reason it was dropped or just an omission? I always thought it kind of matched the 'Original' desktop icon set and gave the desktop a bit of 3D depth.


Tags: woof