Hi!
Now, the thing is that the PHP scripts also connect to the database and,
presumably, uphold the connection over the duration of the session so as
not to disconnect and reconnect continually when the user browses the
website.
My question is - is it possible to do the same thing with those CGI
scripts?
CGI scripts are basically scripts executed at the commandline with a few
parameters and environment variables set (each call normally starts a new
instance).
You could look into the various web frameworks if and how they solved the
problem. If you can't install anything on the server besides CGI scripts,
you're probably out of luck, though.
If you CAN install additional software on the server, mod_perl could be the way
to go. Or run your own small perl-based server for those pages on another port,
HTTP::Server::Simple::CGI (or my Maplat-Framework) might fit your profile - you
may even run them as backend only on localhost and use a PHP script as simple
proxy 8-)
It really depends on what you're planing in the long run.
LG
Rene
--
#!/usr/bin/perl #99BoB (C)2004 cavac:prg count drink vessel place act1 act2
@a...@argv;$c=$a[0]||99;$b=" ".($a[2]||"bottles")." of ".($a[1]||"beer");$w=" ".
($a[3]||"on the wall").",";do{print"$c$b$w\n$c$b,\n".($a[4]||"take one down").
", ".($a[5]||"pass it around").",\n".--$c."$b$w\n\n";}while($c);print"END!\n";
--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/