[Xitami] basic as a script cgi code
Stuart Hands
shands at redlineuk.com
Thu Jun 5 10:12:34 CEST 2008
Don't forget Environ("CGI_STDOUT") and Environ("QUERY_STRING")! Checking for
these at the start of the app is a good indication if it IS being started by
Xitami as CGI or as an unknowning user!
FWIW, all of my CGI applications are written in VB6 and range from basic
enquiry forms to fully blown admin panels linking to MySQL databases and
doing other wizzy stuff that would just be a pain in PHP/Perl/etc. Yea ok,
the overheads of VB is critised as being heavily "code bloated" - but who
REALLY cares when your current webservers are dual dual-core Xeon monsters
with oodles of memory?! I know in the back of my mind that the life of
Xitami is finite and I really should switch to PHP - but I'm yet to find a
reason other than this to switch!
A good one for debugging is to create a single BATch file in your cgi-bin
with a single line:
SET
Returns all the environment variables in one swoop and shows you whats
available to play with!
Stuart
-----Original Message-----
From: xitami-bounces at lists.xitami.org
[mailto:xitami-bounces at lists.xitami.org] On Behalf Of Marc Doigny
Sent: 05 June 2008 07:22
To: Xitami Users General Discussion
Subject: Re: [Xitami] basic as a script cgi code
-----Original Message-----
From: xitami-bounces at lists.xitami.org
[mailto:xitami-bounces at lists.xitami.org] On Behalf Of Magnus Wedberg
Sent: donderdag 5 juni 2008 0:16
To: Xitami Users General Discussion
Subject: Re: [Xitami] basic as a script cgi code
Paul Reid wrote, On 2008-06-04 23:50:
> > basic as a cgi code
>
> ANY DOS/Win program (likewise anything executable under unix) can be
run
> as a CGI.
...if they write to standard output. Turbo Pascal programs, for example
(yeah old), have some own routines for that and cannot be used to run CGI --
they must be wrapped in a batch file (!) for that to work. So, strange
workarounds may be needed.
Xitami allow input/output files instead of stdin/stdout, making Xitami more
easy to use than any other webserver. Get the file name via the
environment: ENVIRON$("CGI_STDIN")
And basic is not dead, don't focus on old QuickBasic (or visual basic) only.
Some basic compilers produce very tight code. If you are used to program in
any basic dialect, go for it!
marc
--
Xitami Users Mailing List -- For Xitami support To unsubscribe:
http://lists.xitami.org/mailman/listinfo/xitami
More information about the Xitami
mailing list