David Bovill wrote:
>
> Thank you very much for your post. It would be great to co-operate on the
> server/cgi port. We have a number of Power Macs running Webstar, and as you
> know I'm setting up a Linux/Apache or mchttpd/CGI environment as well. So
> I'm looking at a solution which would work for both environments (ie apple
> event based and unix cgi based), which would make it easy for student to
> move from simple programming to full perl cgi programming on unix.
OK to answer to all questions you can have about the use of HC as an
acgi application. I have spend enough time to try the best-sellers of
the Web applications servers market, WebSphere, WebObjects or Wisual
Interdev includes, to know that those tools are not conceptual enough to
build great applications. XTalk's make me free to program exactly what i
have in mind. As software designer and as teacher, i need to know and
explain what the best of software development is going to become in the
next years. If it's the same for you, it will be great to co-operate on
this.
> Perhaps I could help with your port? I could set up a similar system on my
> Linux box, and collaborate on scripting/interface. It would be good to also
> set up our Webstar servers with a "MacOS+WebStar+Hypercard acgi application
> server", as well.
Any design ideas are welcome and it would be great to help the Metacard
team about the development of mchttpd. It's always many more difficult
to know what to program than to know how to program it. For the Linux
Box configuration, i'm not realy an expert and Scott is the right person
for that... For the "MacOS+WebStar+Hypercard acgi application server" go
to walk around the "Cyberboutique" link at my office site. If you are
interested, the best way will, than, to go to see by your self how the
stack works and how to clone it to get it doing what you need as a MC
cgi stack (helped by a "the globals" MC script for Linux, and a little
"on appleEvent" MC stack on MacOS).
> > As i am just working on the port of my MacOS+WebStar+Hypercard acgi
> > application server to the Linux+Apache+Metacard issue of the same
> > server, i have found many help in reading the list. Thank's to all. See
> > if the basics of my configuration can help :
> >
> > System installed : Suse Linux 6.2, Apache 1.3.6, Metacard 2.2.5 (full
> > development version, in the home directory of a standard user, not root)
> > on a SN6000 Samsung notebook.
> >
> > No changes needed in the access.conf, httpd.conf and srm.conf files.
> >
> > A link (alias, on mac) of the "mc" program put in the Apache cgi-bin
> > directory.
> >
> > A sap.mt script and a sap.mc stack put in the same cgi-bin directory.
> >
> > A basic "sap.html" post form put in the "htdocs" directory.
> >
> > All the permissions of the "/usr/local/httpd/" subdirectorys sets to
> > "yes,yes,yes" for the user, "yes,no,yes" for the group and "yes,no,yes"
> > for others.
> >
> > The contents of "sap.mt" (in place of the MacOS based "on appleEvent"
> > handler) :
> >
> > #!mc
> > on startup
> > global ExAE
> > repeat with each item i in the globals
>
> What's in the globals by the way???
"the globals" are the datas forvarded by Apache to the CGI application
when the httpd recieve the HTML form request (as GET or as Post, as
below) :
$SCRIPT_NAME = /cgi-bin/sap.mt
$REQUEST_URI = /cgi-bin/sap.mt
$REQUEST_METHOD = POST
$SERVER_PROTOCOL = HTTP/1.0
$GATEWAY_INTERFACE = CGI/1.1
$UNIQUE_ID = OD2qh38AAAIAAACvHX4
$SERVER_SOFTWARE = Apache/1.3.6 (Unix) (SuSE/Linux)
$SERVER_SIGNATURE = <ADDRESS>Apache/1.3.6 Server at sam.k-max.com Port
80</ADDRESS>
$SERVER_PORT = 80
$SERVER_NAME = sam.k-max.com
$SERVER_ADMIN = [EMAIL PROTECTED]
$SCRIPT_FILENAME = /usr/local/httpd/cgi-bin/sap.mt
$REMOTE_PORT = 1024
$REMOTE_ADDR = 127.0.0.2
$PATH = /sbin:/bin:/usr/sbin:/usr/bin
$HTTP_USER_AGENT = Mozilla/4.61 [en] (X11; I; Linux 2.2.10 i686)
$HTTP_REFERER = http://sam.k-max.com/wmc.html
$HTTP_HOST = sam.k-max.com
$HTTP_CONNECTION = Keep-Alive
$HTTP_ACCEPT_LANGUAGE = en
$HTTP_ACCEPT_ENCODING = gzip
$HTTP_ACCEPT_CHARSET = iso-8859-1,*,utf-8
$HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
image/png, */*
$DOCUMENT_ROOT = /usr/local/httpd/kmax
$CONTENT_TYPE = application/x-www-form-urlencoded
$CONTENT_LENGTH = 11 -- the post datas length
ENV=Envoyer -- the post datas to use to build the cgi application reply
You get far the same datas from WebStar on MacOS by using an "on
appleEvent class,event,sender" set as cd script of the stack, where
class is the creator of WebStar and event is "sdoc".
> > put i && "=" && value(i) & return after ExAE
> > end repeat
> > send runsap to stack "sap.mc"
> > end startup
> >
> ...
To do your server more secure, it's always better to choose the "Post"
method than the "Get" when possible.
;-)
Pierre
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pierre Sahores CRDP de l'academie de Creteil
Tel.: +33 143247509 20, rue Daniele-Casanova
Fax.: +33 148726072 94170 Le Perreux - France
[EMAIL PROTECTED] http://www.crdp.ac-creteil.fr
Web applications servers design, XTalk's, MacOS, Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~