Re: Apache settings for MC CGI (urgent)

2004-01-26 Thread Sjoerd Op 't Land
Chipp Walters wrote/ schreef:

> Oh, just received this... hope it helps, too.
Yep, it helps a lot. The problem seems to be te one mentioned on the
Sonsothunder website: a c++ library is missing. With the version you posted,
it runs scripts perfectly.

Thanks a lot, and for the moment, everything works.

Regards,
Sjoerd

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Apache settings for MC CGI (urgent)

2004-01-26 Thread Chipp Walters
Oh, just received this... hope it helps, too.

-

Hi Chipp,

I used to use the Linux CGI engine in RH 7 but for some reason it stopped
working in RH 9 (can't remember what the error message was). Now I am using
the Linux engine which can be downloaded at:

http://www.runrev.com/revolution/downloads/distributions/2.1/linux.tgz

Just use wget to retrieve the file and unzip it in the server.

If you happen to test revxml and MySQL at your side, let me know whether
it's working or not at your side.

Shishi



On 23/1/04 1:30 PM, "Chipp Walters" <[EMAIL PROTECTED]> wrote:

> ShiShi,
>
> My partner Chris was attempting to install the linux version of the MC CGI
> engine today and ran into some problems which I thought you might be able
to
> shed some light on.
>
> 1) Where did you get your linux mc cgi engine? What URL?
> 2) After we installed the version we got from:
> http://www.runrev.com/revolution/downloads/engines/2.0/cgi/linux.zip
>
> We get the error message
>
> Incorrectly built binary which accesses errno, h_errno or _res directly
>
> Turns out there was a change in glibc 2.3 and binaries compiled on prior
> machines won't work in rh9. So, how do you get yours to work?
>
> Thanks for any help :-)
>
> Please copy all of us on your reply,
>
> Chipp Walters
>
>
>


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Apache settings for MC CGI (urgent)

2004-01-26 Thread Chipp Walters
Sjoerd,

Check out Ken Ray's article in the Developer Resources Section at:

www.sonsothunder.com

(CGI)

-Chipp

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Sjoerd Op 't Land
> Sent: Sunday, January 25, 2004 4:45 PM
> To: MetaCard Mailing- List
> Cc: Martin Op 't Land
> Subject: Apache settings for MC CGI (urgent)
>
>
> Hello all,
>
> It's been a while since I last posted here, but I still dare to pose my
> question ;) (Hope you forgive the lurking...)
>
> Does anyone of you have installed cmc.exe as CGI interpreter for MetaTalk
> scripts with Apache? Could you please post some essential details
> on setting
> up the server?
>
> I pose this question as urgent because the previous webhoster of some
> scripts went bankrupt, and we now have 'till end of January to
> move to a new
> one. The problem is that he isn't able to set up Apache correctly... so if
> you could post some details on setting up Apache for that... that'd be
> really great.
>
> Thanks in advance,
> Sjoerd Op 't Land
>
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
>


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Apache settings for MC CGI (urgent)

2004-01-25 Thread Sjoerd Op 't Land
Hello all,

It's been a while since I last posted here, but I still dare to pose my
question ;) (Hope you forgive the lurking...)

Does anyone of you have installed cmc.exe as CGI interpreter for MetaTalk
scripts with Apache? Could you please post some essential details on setting
up the server?

I pose this question as urgent because the previous webhoster of some
scripts went bankrupt, and we now have 'till end of January to move to a new
one. The problem is that he isn't able to set up Apache correctly... so if
you could post some details on setting up Apache for that... that'd be
really great.

Thanks in advance,
Sjoerd Op 't Land

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: mc-cgi and a database -- ideas, please

2003-11-13 Thread Dave Cragg
At 11:13 pm +0900 13/11/03, kweto wrote:
Hello List,

Sorry for the off-topic'ness -- and vagueness! -- of this bit of
self-indulgence but since this is the best and gentlest group to ask, I'll
fire away anyway.
I'm looking to put together a language-learning website that my students --
and my students *only* -- can access from their home pc's and which,
invisibly in the background, updates a database of student records (eg,
names, passwords, dates site was accessed, time spent on the various
language activities, grades). Of course, I want to involve mc-cgi in this as
much as possible. (I've already been relying successfully on mc-cgi for a
while now to help run my other internet-based doo-dahs.)
The following "model" is my stab-in-the-dark attempt at envisioning the
basic pieces of this puzzle and how to co-ordinate them:
1. on the web-server (a paid-for hosting service), I password-protect the
website's top-folder and then manually enter individual usernames and
passwords for each of my 100 or so students
2. place all my mc-cgi doo-dahs inside that password-protected folder

3. create a MySQL database using my web-hosting service's "SQL Database"
control panel
4. script some kind of mc-cgi doohickey that acts as an invisible
intermediary between that database and
   (a) (to keep track of who and when) the log-in window that pops up when a
student accesses that top-folder
   (b) (to keep track of what and how) the various language activities,
a.k.a, mc-cgi doo-dahs
Now, assuming that I'm not too far off-track with that "plan" -- and that
there aren't better alternative models -- what I don't understand is how to
do Step 3. Actually, as far as Step 3(b) goes, I guess that given enough
still-active brain cells and plenty of searches thru the List Archives I
might eventually churn out some kind of scripting solution all on my own;
however, I cannot fathom out at all how to go about scripting something for
Step 3(a), namely, getting mc to "talk" with whatever process underlies the
web-server calling up a log-in window for password-protected folders.
If you use standard password protection on the folder, it's the 
server that would handle the password stuff before it gets to your 
cgi, so keeping track might be tricky. An alternative way would be to 
put the cgi scripts in the normal cgi-bin location, and instead of 
password protecting the folder, use some custom headers in the http 
request that would let the cgi script do the authentication.

A simple example:

On the client side:
Say the client app contacts the server to request data for one of 
four available exercises. To get exercise 1, you could do something 
like this:

# assume tID contains the student's ID

put "kweto_doohick: exerciseplease,1" & tID into tHeaders
set the httpHeaders to theaders
put url "http://www.kweto.com/cgi-bin/thingie.mt"; into tExercise_1_Data
##do the usual check on the result
## etc, etc
Then in the "thingie.mt" script:

#!/somewhere/mc
on startup
  put $HTTP_kweto_doohick into tActionString
  if item 1 of tActionString = "exerciseplease" then
put item 3 of tActionString into tUserID
   ## do the big brother stuff on the user here if needed
put item 2 of tActionString into tExNumber
switch tExNumber
   case 1
 ##get the exercise 1 data
 ## send it back in the normal way
   case 2
   ### etc, etc
end switch
  else ## no proper header,
put "error" && "Not Welcome!" & cr into tErrString
put "Status: 410" && "go away" & cr
put "Content-Type: text/plain" & cr
put "Content-Length:" && length(tErrString) & cr
put cr
put tErrString
  end if
This will stop casual browsing of your cgi. If necessary, you could 
add more secure features to the custom headers. (session keys, MD5 
digests, and what have you)

Cheers
Dave
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


mc-cgi and a database -- ideas, please

2003-11-13 Thread kweto
Hello List,
(B
(BSorry for the off-topic'ness -- and vagueness! -- of this bit of
(Bself-indulgence but since this is the best and gentlest group to ask, I'll
(Bfire away anyway.
(B
(BI'm looking to put together a language-learning website that my students -- 
(Band my students *only* -- can access from their home pc's and which,
(Binvisibly in the background, updates a database of student records (eg,
(Bnames, passwords, dates site was accessed, time spent on the various
(Blanguage activities, grades). Of course, I want to involve mc-cgi in this as
(Bmuch as possible. (I've already been relying successfully on mc-cgi for a
(Bwhile now to help run my other internet-based doo-dahs.)
(B
(BThe following "model" is my stab-in-the-dark attempt at envisioning the
(Bbasic pieces of this puzzle and how to co-ordinate them:
(B
(B1. on the web-server (a paid-for hosting service), I password-protect the
(Bwebsite's top-folder and then manually enter individual usernames and
(Bpasswords for each of my 100 or so students
(B
(B2. place all my mc-cgi doo-dahs inside that password-protected folder
(B
(B3. create a MySQL database using my web-hosting service's "SQL Database"
(Bcontrol panel
(B
(B4. script some kind of mc-cgi doohickey that acts as an invisible
(Bintermediary between that database and
(B   (a) (to keep track of who and when) the log-in window that pops up when a
(Bstudent accesses that top-folder
(B   (b) (to keep track of what and how) the various language activities,
(Ba.k.a, mc-cgi doo-dahs
(B
(BNow, assuming that I'm not too far off-track with that "plan" -- and that
(Bthere aren't better alternative models -- what I don't understand is how to
(Bdo Step 3. Actually, as far as Step 3(b) goes, I guess that given enough
(Bstill-active brain cells and plenty of searches thru the List Archives I
(Bmight eventually churn out some kind of scripting solution all on my own;
(Bhowever, I cannot fathom out at all how to go about scripting something for
(BStep 3(a), namely, getting mc to "talk" with whatever process underlies the
(Bweb-server calling up a log-in window for password-protected folders.
(B
(BAgain, if I'm missing the obvious in all of this or have turned left when I
(Bought to have turned right, I'd be very glad, not to mention grateful, for
(Bwhatever hand-holding comes my way.
(B
(BCheers,
(B
(BNicolas Cueto
(B
(B___
(Bmetacard mailing list
(B[EMAIL PROTECTED]
(Bhttp://lists.runrev.com/mailman/listinfo/metacard

RE: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-18 Thread Ken Ray
OK, I finally got it to work, and I'll be writing up a tip on it right
away. :-) But for those taking notes, here's the steps:

1) Turn on Personal Web Sharing in the Sharing control panel (which told
me my web address was "http://192.168.1.100/~kenray/";). This creates an
index.html file in the Sites folder on your hard drive (in my case it
was /users/kenray/Sites/).

2) Download the Darwin MC CGI from the Metacard web site, decompress it
down to its "mc" file, and put it into folder
/Library/WebServer/CGI-Executables.

3) Place your CGI script in the same folder as the "mc" file. Mine is
called "simple.cgi", which simply dumps "Hello World" as a result. It
looks like this:

!#mc

on startup
  put "Hello World!" into tResponse
  put "Content-Type: text/html" & crlf
  put "Content-Length:" & the length of tResponse & crlf & crlf
  put tResponse
end startUp

4) Set the permissions on both files to at least 755 (I used 777 (just
in case)).

5) Open up Terminal, do "cd /library/webserver/cgi-executables/" to get
to the CGI-Executables directory, and execute "./mc simple.cgi". You
should get back this:

Content-type: text/html
Content-length:12

Hello World!

6) Then, open up your browser and type the IP address you were given in
the Sharing control panel, followed by "/cgi-bin/simple.cgi". In my case
it was:

  http://192.168.1.100/cgi-bin/simple.cgi

You should get "Hello World!" showing up in your browser. 

As Dave noted, the /Library/WebServer/CGI-Executables directory can be
referred to as "cgi-bin" in your urls.

7) Create the rest of your site in the Site folder and when you want to
refer to the CGI, simply use /cgi-bin/

RE: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-18 Thread Ken Ray
> >Ok, I put them there (both the "mc" app and my "simple.cgi" file (I'm
> >using .cgi instead of .mt)), but when I attempt to call on the cgi
> >directly from the address bar of safari by typing:
> >
> >http://192.168.1.100/~kenray/cgi-bin/simple.cgi
> >
> >I get a "Not Found" page saying that "the requested URL is 
> not found on
> >the server.
> >
> >What am I missing?
> 
> Try this:
> 
> http://192.168.1.100/cgi-bin/simple.cgi
> 
> The cgi-bin "alias" is for the whole domain. If you want separate 
> cgi-bin folders for each user account, you'll need to edit the Apache 
> config file (/etc/httpd/httpd.conf). Don't ask me how.

Thanks, Dave, but when I use the URL you suggested, I get a an error
403: "You don't have permisson to access /cgi-bin/simple.cgi on this
server".

I'm still stumped. 

Has anyone out there actually set this up on OS X and can provide
step-by-step instructions? It should be the same for every copy of OS X
out there who has simply turned Personal Web Sharing on and wants to run
a CGI...

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/ 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-18 Thread Brian Yennie
There's also this:

#AddHandler cgi-script .cgi

Uncomment it and change the file extension to whatever you want: files 
with that extension will become executable from anywhere.

IOW:

AddHandler cgi-script .mt

The cgi-bin "alias" is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-18 Thread Brian Yennie
The cgi-bin "alias" is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.
Check out this section to set specific options for user directories:

#
#AllowOverride FileInfo AuthConfig Limit
#Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#
#Order allow,deny
#Allow from all
#
#
#Order deny,allow
#Deny from all
#
#
Just uncomment and modify, I would try adding "ExecCGI" to the list of 
options.

You'll have to cruise to apache.org if you want documentation on all of 
the options...

HTH

Brian

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-18 Thread Dave Cragg
At 12:39 am -0500 18/10/03, Ken Ray wrote:
 > 3) I created a "cgi-bin" directory in the Sites folder to
 hold my CGI.
 I think this is where you went off track. The Darwin "mc" app
 and your
 cgi "mt" files should be in
 "/Library/WebServer/CGI-Executables/" at the
 system level, not the user level.

 Then in your user Sites folder, you can put html files that reference
 the cgi if you like. But the cgi itself has to be run by the system.
 (BTW, you can refer to the "CGI-Executables" folder as
 "cgi-bin" in your
 html files, and it still works. The OS treats the terms as
 interchangeable.)
Ok, I put them there (both the "mc" app and my "simple.cgi" file (I'm
using .cgi instead of .mt)), but when I attempt to call on the cgi
directly from the address bar of safari by typing:
http://192.168.1.100/~kenray/cgi-bin/simple.cgi

I get a "Not Found" page saying that "the requested URL is not found on
the server.
What am I missing?
Try this:

http://192.168.1.100/cgi-bin/simple.cgi

The cgi-bin "alias" is for the whole domain. If you want separate 
cgi-bin folders for each user account, you'll need to edit the Apache 
config file (/etc/httpd/httpd.conf). Don't ask me how.

Cheers
Dave
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-17 Thread Ken Ray

> > 3) I created a "cgi-bin" directory in the Sites folder to 
> hold my CGI.
> 
> I think this is where you went off track. The Darwin "mc" app 
> and your 
> cgi "mt" files should be in 
> "/Library/WebServer/CGI-Executables/" at the 
> system level, not the user level.
>

> Then in your user Sites folder, you can put html files that reference 
> the cgi if you like. But the cgi itself has to be run by the system. 
> (BTW, you can refer to the "CGI-Executables" folder as 
> "cgi-bin" in your 
> html files, and it still works. The OS treats the terms as 
> interchangeable.)

Ok, I put them there (both the "mc" app and my "simple.cgi" file (I'm
using .cgi instead of .mt)), but when I attempt to call on the cgi
directly from the address bar of safari by typing:

http://192.168.1.100/~kenray/cgi-bin/simple.cgi

I get a "Not Found" page saying that "the requested URL is not found on
the server.

What am I missing?

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/ 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-17 Thread J. Landman Gay
On 10/17/03 10:49 PM, Ken Ray wrote:

Well, after getting my CGI to work on my ISP's Linux box, I thought
doing it in OS X would be a snap. Not so, brothers and sisters! Here's
what I've done and where I'm stuck:
1) I turned on Personal Web Sharing in the Sharing control panel (which
told me my web address was "http://192.168.1.100/~kenray/";)
2) I went to the Sites folder on my hard drive (/users/kenray/Sites/)
and noted that it had created an index.html file. So far so good.
3) I created a "cgi-bin" directory in the Sites folder to hold my CGI.
I think this is where you went off track. The Darwin "mc" app and your 
cgi "mt" files should be in "/Library/WebServer/CGI-Executables/" at the 
system level, not the user level.

Then in your user Sites folder, you can put html files that reference 
the cgi if you like. But the cgi itself has to be run by the system. 
(BTW, you can refer to the "CGI-Executables" folder as "cgi-bin" in your 
html files, and it still works. The OS treats the terms as interchangeable.)

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


RE: Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-17 Thread Monte Goulding

> So here I am... stuck! Can anyone help me and tell me where I went
> wrong?

It's probably Apache not configured to execute scripts in that directory.
Read the Apache docs about making cgi's executable from anywhere. Another
hint is to drop mc into your bin folder: /bin/mc That also helps when
executing scripts from anywhere.

You may also want to downloade Complete Apache 2. Forgotten the URL but it
gives you a nice preference pane for config and logs etc.

Cheers

Monte

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Getting MC CGI to work on OS X with "Web Sharing" turned on

2003-10-17 Thread Ken Ray
Well, after getting my CGI to work on my ISP's Linux box, I thought
doing it in OS X would be a snap. Not so, brothers and sisters! Here's
what I've done and where I'm stuck:

1) I turned on Personal Web Sharing in the Sharing control panel (which
told me my web address was "http://192.168.1.100/~kenray/";)

2) I went to the Sites folder on my hard drive (/users/kenray/Sites/)
and noted that it had created an index.html file. So far so good.

3) I created a "cgi-bin" directory in the Sites folder to hold my CGI.

4) I downloaded the Darwin MC CGI from the Metacard web site,
decompressed it down to its "mc" file, and put it into the new "cgi-bin"
folder I'd created.

5) I placed in the cgi-bin folder my "simple.cgi" script, which simply
dumps "Hello World" as a result. The first line in the script is "#!mc".

6) I set the permissions on both files to 777 (just in case).

7) I opened Terminal, went to the cgi-bin directory, and executed "./mc
simple.cgi", and got back this:

Content-type: text/html
Content-length:12

Hello World!

8) Thinking everything was going smoothly, I opened my browser and
navigated to "http://192.168.1.100/~kenray/";, and got my entire script
dumped out into the browser. 

9) Ok, I said, it has something to do with the fact that OS X can't find
MC at #!mc, so I tried a variety of different paths (including full
paths (#!/users/kenray/Sites/cgi-bin/mc), partial paths (#!/cgi-bin/mc),
and the like, and none of them worked!

So here I am... stuck! Can anyone help me and tell me where I went
wrong?

Thanks in advance,

Ken Ray
Sons of Thunder Software
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/ 


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC CGI system requirements

2003-06-06 Thread andu


--On Friday, June 06, 2003 12:18:45 -0700 Richard Gaskin 
<[EMAIL PROTECTED]> wrote:

andu wrote:

Since apparently an ISP can have a functional BSD server running that's
still missing libs MC requires, what are the complete system
requirements for MC?
Telnet to where mc is on the server and do: ldd mc. It will list the
availabe and missing libraries.
Thank you, but sadly my ISP doesn't support Telnet at this time ("security
reasons").
Try ssh, they must support that.



Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC CGI system requirements

2003-06-06 Thread Richard Gaskin
andu wrote:

>> Since apparently an ISP can have a functional BSD server running that's
>> still missing libs MC requires, what are the complete system requirements
>> for MC?
> 
> Telnet to where mc is on the server and do: ldd mc. It will list the
> availabe and missing libraries.

Thank you, but sadly my ISP doesn't support Telnet at this time ("security
reasons").

More to the point, wouldn't this information seem relevant for inclusion in
the system requirements shown at metacard.com?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: MC CGI system requirements

2003-06-06 Thread andu


--On Friday, June 06, 2003 10:48:18 -0700 Richard Gaskin 
<[EMAIL PROTECTED]> wrote:

During a system upgrade at my ISP my MC CGIs are no longer working.  While
I'm still diagnosing the issue with my ISP, at the moment it appears to be
related to a problem Ken had in which his ISP had not installed certain
libraries with their BSD installation.
Since apparently an ISP can have a functional BSD server running that's
still missing libs MC requires, what are the complete system requirements
for MC?
Telnet to where mc is on the server and do: ldd mc. It will list the 
availabe and missing libraries.

The system requirements at  provide few
details.
--
 Richard Gaskin
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


MC CGI system requirements

2003-06-06 Thread Richard Gaskin
During a system upgrade at my ISP my MC CGIs are no longer working.  While
I'm still diagnosing the issue with my ISP, at the moment it appears to be
related to a problem Ken had in which his ISP had not installed certain
libraries with their BSD installation.

Since apparently an ISP can have a functional BSD server running that's
still missing libs MC requires, what are the complete system requirements
for MC?

The system requirements at  provide few
details.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Parsing complex POST requests with MC cgi

2003-02-03 Thread jbv
Hi list,

I have a complex HTML page with a sophisticated
form, mainly due to several http://lists.runrev.com/mailman/listinfo/metacard



Re: MC CGI - What can't I do?

2002-08-27 Thread Richard Gaskin

David Bovill wrote:

>> --On Monday, August 26, 2002 21:21:49 -0700 Richard Gaskin
>> <[EMAIL PROTECTED]> wrote:
>> 
>> - paint tools do not generate an error:
>> choose brush tool
>> set the brushcolor to blue
>> drag from 60,60 to 80,80
>> select img 1 of stack "tmp/formdata.mc"
>> export png to file "myimg.png"
> 
> Have you tried accesing the image data directly using 2.4 features - my
> guess is that would work?

I thought about it, but at that point I'd be recreating a combination of
MC's graphics routines and OS graphics routines in MetaTalk.  Likely slow,
and certainly more than I'd want to chew off:  who wants to calculate curves
in imagedata?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any Database on Any Site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: MC CGI - What can't I do?

2002-08-27 Thread David Bovill

On Tue, 2002-08-27 at 05:31, andu wrote:
> 
> 
> --On Monday, August 26, 2002 21:21:49 -0700 Richard Gaskin 
> <[EMAIL PROTECTED]> wrote:
> 
> >
> > - paint tools do not generate an error:
> > choose brush tool
> > set the brushcolor to blue
> > drag from 60,60 to 80,80
> > select img 1 of stack "tmp/formdata.mc"
> > export png to file "myimg.png"
> >

Have you tried accesing the image data directly using 2.4 features - my
guess is that would work?


___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: MC CGI - What can't I do?

2002-08-26 Thread andu



--On Monday, August 26, 2002 21:21:49 -0700 Richard Gaskin 
<[EMAIL PROTECTED]> wrote:

> andu wrote:
>
>> --On Monday, August 26, 2002 15:04:35 -0700 Richard Gaskin
>> <[EMAIL PROTECTED]> wrote:
>>
>>> I've foound that MC as a CGI will let me create stack files on the
>>> serber and use their custom props for data storage.  Way cool.
>>>
>>> This has me thinking:  just whar can't I do faceless on a server?
>>>
>>> For example, I know I can't take screen shots, but can I paint and
>>> export JPEGs?
>>>
>>> What general restrictions apply when running MC as a CGI?
>>
>> I didn't figure them all out but I would assume anything having to do
>> with the visual or audio for that matter are off limits to mt scripts
>> since they most likely need libraries which are not available in this
>> state. Also any reference to stacks ("...this stack", cards, custom
>> properties etc.) are off limits.
>
> Not entirely true, which is what got me so excited.  Here's some of what I
> found:
>
> - stack files can be created:
> create stack "tmp"
> set the filename of stack "tmp" to "tmp/formdata.mc"
>
> - custom properties of stack files can be set:
> set the customproperties of stack "tmp/formdata.mc" to tInData
>
> - paint tools do not generate an error:
> choose brush tool
> set the brushcolor to blue
> drag from 60,60 to 80,80
> select img 1 of stack "tmp/formdata.mc"
> export png to file "myimg.png"
>
> - in the example above, the export command does not generate an error and
> an image file is created, but the image is a solid-colored rectangle
> instead of the painted image.
>
>
> So it looks like we're limited to text processing only, with the added
> benefit of using stack file properties for limited hierarchically-ordered
> data.  A fair replacement for Perl, but such a frustratingly small subset
> of what MC can do.
>
> I understand the reasoning behind these limitations (had to try anyway --
> after all, ignoring one of the early SC programmers is what led me to
> discover that I could store binary data in its fields), but I can't help
> but wonder if there's some way we could get graphics capabilities in MC
> CGIs in the future

Keep in mind that all those capabilities you mention are not of the cgi 
itself but of the stack it created.

>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  Custom Software and Web Development for All Major Platforms
>  Developer of WebMerge 2.0: Publish any Database on Any Site
>  ___
>  [EMAIL PROTECTED]   http://www.FourthWorld.com
>  Tel: 323-225-3717   AIM: FourthWorldInc
>
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
>



Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: MC CGI - What can't I do?

2002-08-26 Thread Richard Gaskin

andu wrote:

> --On Monday, August 26, 2002 15:04:35 -0700 Richard Gaskin
> <[EMAIL PROTECTED]> wrote:
> 
>> I've foound that MC as a CGI will let me create stack files on the serber
>> and use their custom props for data storage.  Way cool.
>> 
>> This has me thinking:  just whar can't I do faceless on a server?
>> 
>> For example, I know I can't take screen shots, but can I paint and export
>> JPEGs?
>> 
>> What general restrictions apply when running MC as a CGI?
> 
> I didn't figure them all out but I would assume anything having to do with
> the visual or audio for that matter are off limits to mt scripts since they
> most likely need libraries which are not available in this state.
> Also any reference to stacks ("...this stack", cards, custom properties
> etc.) are off limits.

Not entirely true, which is what got me so excited.  Here's some of what I
found:

- stack files can be created:
create stack "tmp"
set the filename of stack "tmp" to "tmp/formdata.mc"
  
- custom properties of stack files can be set:
set the customproperties of stack "tmp/formdata.mc" to tInData

- paint tools do not generate an error:
choose brush tool
set the brushcolor to blue
drag from 60,60 to 80,80
select img 1 of stack "tmp/formdata.mc"
export png to file "myimg.png"

- in the example above, the export command does not generate an error and an
image file is created, but the image is a solid-colored rectangle instead of
the painted image.


So it looks like we're limited to text processing only, with the added
benefit of using stack file properties for limited hierarchically-ordered
data.  A fair replacement for Perl, but such a frustratingly small subset of
what MC can do.

I understand the reasoning behind these limitations (had to try anyway --
after all, ignoring one of the early SC programmers is what led me to
discover that I could store binary data in its fields), but I can't help but
wonder if there's some way we could get graphics capabilities in MC CGIs in
the future

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any Database on Any Site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: MC CGI - What can't I do?

2002-08-26 Thread andu



--On Monday, August 26, 2002 15:04:35 -0700 Richard Gaskin 
<[EMAIL PROTECTED]> wrote:

> I've foound that MC as a CGI will let me create stack files on the serber
> and use their custom props for data storage.  Way cool.
>
> This has me thinking:  just whar can't I do faceless on a server?
>
> For example, I know I can't take screen shots, but can I paint and export
> JPEGs?
>
> What general restrictions apply when running MC as a CGI?

I didn't figure them all out but I would assume anything having to do with 
the visual or audio for that matter are off limits to mt scripts since they 
most likely need libraries which are not available in this state.
Also any reference to stacks ("...this stack", cards, custom properties 
etc.) are off limits.

>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  Custom Software and Web Development for All Major Platforms
>  Developer of WebMerge 2.0: Publish any Database on Any Site
>  ___
>  [EMAIL PROTECTED]   http://www.FourthWorld.com
>  Tel: 323-225-3717   AIM: FourthWorldInc
>
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard
>



Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



MC CGI - What can't I do?

2002-08-26 Thread Richard Gaskin

I've foound that MC as a CGI will let me create stack files on the serber
and use their custom props for data storage.  Way cool.

This has me thinking:  just whar can't I do faceless on a server?

For example, I know I can't take screen shots, but can I paint and export
JPEGs?

What general restrictions apply when running MC as a CGI?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any Database on Any Site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



mc & cgi question

2002-03-08 Thread Richard MacLemale

OK, here's a question.  When darwin mc is running, what is it running AS?
It can write to files with read/write (everyone), but cannot write to files
with read only (everyone.)  If I knew what it was running AS, I could put
that into a group and simplify my life.  When I use the shell command
whoami, it returns "root."   But that's what the shell commands are run as,
NOT what the metatalk scripts are run as.  I can get around this by using
shell commands to write files instead of metatalk commands (open file,
etc.), but the question remains.  Anyone have the answer?  :)

:)
Richard MacLemale
Instructional Technology Specialist
James W. Mitchell High School
http://mitchellonline.pasco.k12.fl.us

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Trigger MC CGI with nothing to StandardOut

2002-03-05 Thread andu

Sivakatirswami wrote:
> 
> Aloha,
> 
> Since my knowledge of CGI fills a small thimble... this question, ( which
> perhaps it more appropriately sent to the Apache listserver/forum, but since
> I want to do it from within MC)
> 
> I have a little mc cgi that "rotates" an image by randomly selecting one
> from a set of 15 and reading a gif as binary and writing out the file again
> under a standard name which is the tag in the HTML that is served. (see
> script below). I can trigger the CGI "from home" from within MC using "get
> url..." and it works fine. I can also put
> 
> www.gurudeva.org/cgi-bin/rotate_taka_art.cgi
> 
> into my browser  and it works fine.  But, if I comment out the part  that
> serves the image to the browser...(the last three lines of this script) I
> will get an apache error... obviously on a GET Apache "demands' that
> something be sent to standardOut. What I want to do is eliminate the last
> three lines and still be able to trigger the CGI remotely.
> 
> Another way to state the problem is: from with MC/REV how to tell a CGI to
> execute where that CGI doesn't return anything.. it simply performs an
> operation on site.
> 
> OK, some context in case there is an entire better strategy: the goal is to
> include a statement in the html form of a index.shtml that is served that
> would trigger the CGI
>   But, this doesn't work... I
> get binary code for the GIF in the place where this is entered, not a .GIF
> image... So, I want to "lop off" the last three lines so that when the page
> is hit, put the statement at the top of the page and have a normal img src
> tag, which goes for the same image, but the CGI will have swapped it for a
> new one each time, i.e. the art is "rotated and the next person who uses the
> page gets a different image... but, if I lop of the last three lines, apache
> doesn't like this either.  I actually solved the problem with a work around
> by sending nothing out the pipe... but there are other situations where I
> don't want to be forced to send anything to standardOut...

One thing to do is to have index.html replaced with a script which would
do 2 things: do whatever you want with the image and load and pass to
the server the *real* index.html page.
Also you may be able to do this using the redirect Apache function to
trigger the script but I don't know details on that.

> 
> ## rotate_taka_art.cgi ##
> on startup
>set the directory to "../images"
>put random(15) into AumNo
>put "taka_aum_" &AumNo&".gif" into nextAum
>put URL ("binfile:aums/"&nextAum) into temp_image
>put temp_image into URL ("binfile:taka_header_art.gif")
>put "Content-Type: image/gif" & cr
>put "Content-Length:" && the length of temp_image & cr & cr
>put temp_image
> end startUp
> 
> Wants to become:
> 
> on startup
>set the directory to "../images"
>put random(15) into AumNo
>put "taka_aum_" &AumNo&".gif" into nextAum
>put URL ("binfile:aums/"&nextAum) into temp_image
>put temp_image into URL ("binfile:taka_header_art.gif")
> end startUp
> 
> this work around works also, where send nothing to standard out except a
> header and then you can include the exec statement at the top of the HTML
> page... but this is very "hokey"
> :
> #!/export/vhost/org/g/gurudeva/www/public_html/cgi-bin/mc
> on startup
>set the directory to "../images"
>put random(15) into AumNo
>put "taka_aum_" &AumNo&".gif" into nextAum
>put URL ("binfile:aums/"&nextAum) into temp_image
>put temp_image into URL ("binfile:taka_header_art.gif")
>  put empty into dummyOut
>   put "Content-Type: image/gif" & cr
>put "Content-Length:" && the length of dummyOut & cr & cr
>put dummyOut
> end startUp
> 
> Hinduism Today
> 
> Sivakatirswami
> Editor's Assistant/Production Manager
> [EMAIL PROTECTED]
> www.HinduismToday.com, www.HimalayanAcademy.com,
> www.Gurudeva.org, www.hindu.org
> 
> Read The Master Course Lesson of the Day at
> http://www.gurudeva.org/lesson.shtml
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 

Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Trigger MC CGI with nothing to StandardOut

2002-03-05 Thread Sivakatirswami

Aloha, 

Since my knowledge of CGI fills a small thimble... this question, ( which
perhaps it more appropriately sent to the Apache listserver/forum, but since
I want to do it from within MC)

I have a little mc cgi that "rotates" an image by randomly selecting one
from a set of 15 and reading a gif as binary and writing out the file again
under a standard name which is the tag in the HTML that is served. (see
script below). I can trigger the CGI "from home" from within MC using "get
url..." and it works fine. I can also put

www.gurudeva.org/cgi-bin/rotate_taka_art.cgi

into my browser  and it works fine.  But, if I comment out the part  that
serves the image to the browser...(the last three lines of this script) I
will get an apache error... obviously on a GET Apache "demands' that
something be sent to standardOut. What I want to do is eliminate the last
three lines and still be able to trigger the CGI remotely.

Another way to state the problem is: from with MC/REV how to tell a CGI to
execute where that CGI doesn't return anything.. it simply performs an
operation on site. 

OK, some context in case there is an entire better strategy: the goal is to
include a statement in the html form of a index.shtml that is served that
would trigger the CGI
  But, this doesn't work... I
get binary code for the GIF in the place where this is entered, not a .GIF
image... So, I want to "lop off" the last three lines so that when the page
is hit, put the statement at the top of the page and have a normal img src
tag, which goes for the same image, but the CGI will have swapped it for a
new one each time, i.e. the art is "rotated and the next person who uses the
page gets a different image... but, if I lop of the last three lines, apache
doesn't like this either.  I actually solved the problem with a work around
by sending nothing out the pipe... but there are other situations where I
don't want to be forced to send anything to standardOut...

## rotate_taka_art.cgi ##
on startup
   set the directory to "../images"
   put random(15) into AumNo
   put "taka_aum_" &AumNo&".gif" into nextAum
   put URL ("binfile:aums/"&nextAum) into temp_image
   put temp_image into URL ("binfile:taka_header_art.gif")
   put "Content-Type: image/gif" & cr
   put "Content-Length:" && the length of temp_image & cr & cr
   put temp_image
end startUp

Wants to become:

on startup
   set the directory to "../images"
   put random(15) into AumNo
   put "taka_aum_" &AumNo&".gif" into nextAum
   put URL ("binfile:aums/"&nextAum) into temp_image
   put temp_image into URL ("binfile:taka_header_art.gif")
end startUp

this work around works also, where send nothing to standard out except a
header and then you can include the exec statement at the top of the HTML
page... but this is very "hokey"
:
#!/export/vhost/org/g/gurudeva/www/public_html/cgi-bin/mc
on startup
   set the directory to "../images"
   put random(15) into AumNo
   put "taka_aum_" &AumNo&".gif" into nextAum
   put URL ("binfile:aums/"&nextAum) into temp_image
   put temp_image into URL ("binfile:taka_header_art.gif")
 put empty into dummyOut
  put "Content-Type: image/gif" & cr
   put "Content-Length:" && the length of dummyOut & cr & cr
   put dummyOut
end startUp


Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc cgi darwin

2002-01-25 Thread Pierre Sahores

andu wrote:
> 
> Richard MacLemale wrote:
> >
> > I wrote, then Andu wrote,
> > >> on startup
> > >>put "Hello"
> > >>put shell("ls -l")
> > >> end startup
> > >>
> > >> When I run it from the command line (./test.mt), I get this:
> > >>
> > >> Hello
> > >>
> > >> I can run other metacard scripts and everything else works perfectly.
> > >>
> > >> Sooo What am I doing wrong?
> > >
> > > Nothing. It just doesn't work. It works on Linux though so it must be a
> > > Darwin thing.
> >
> > OK - Scott Raney said you could do shell commands in darwin mc, and someone
> > else verified that you could, but the above script doesn't work, s...
> > What would be an example of a script that WOULD work?
> 
> I can do shell() in a stack (GUI) but not in a cgi or a stack called by
> a cgi with "start using". Why, I don't know maybe Scott can tell us what
> we do wrong.
> 
> >
> > Please?
> >
> > :)
> > Richard MacLemale
> > Instructional Technology Specialist
> > James W. Mitchell High School
> > http://mitchellonline.pasco.k12.fl.us
> >
> > ___
> > metacard mailing list
> > [EMAIL PROTECTED]
> > http://lists.runrev.com/mailman/listinfo/metacard
> 
> --
> __
>  Regards, Andu
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

Hi Andu,

Do you have set the right permissions (file and directory) as needed
before lauching the .mt cgi-script ?

Best Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc cgi darwin

2002-01-25 Thread andu

Richard MacLemale wrote:
> 
> I wrote, then Andu wrote,
> >> on startup
> >>put "Hello"
> >>put shell("ls -l")
> >> end startup
> >>
> >> When I run it from the command line (./test.mt), I get this:
> >>
> >> Hello
> >>
> >> I can run other metacard scripts and everything else works perfectly.
> >>
> >> Sooo What am I doing wrong?
> >
> > Nothing. It just doesn't work. It works on Linux though so it must be a
> > Darwin thing.
> 
> OK - Scott Raney said you could do shell commands in darwin mc, and someone
> else verified that you could, but the above script doesn't work, s...
> What would be an example of a script that WOULD work?

I can do shell() in a stack (GUI) but not in a cgi or a stack called by
a cgi with "start using". Why, I don't know maybe Scott can tell us what
we do wrong.

> 
> Please?
> 
> :)
> Richard MacLemale
> Instructional Technology Specialist
> James W. Mitchell High School
> http://mitchellonline.pasco.k12.fl.us
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: externals

2002-01-22 Thread andu

David Bovill wrote:
> 
> Andu, is that a confirmation that mc/cgi script can't call externals? How
> about if you "use" a stack which calls the externals?

It's not, I never tried this but so seemed to recall Brian. Maybe Scott
Raney could tell us for sure. But like I said, you can "use" a stack. 

> 
> > From: andu <[EMAIL PROTECTED]>
> > Subject: Re: mc & cgi: externals
> >
> > [EMAIL PROTECTED] wrote:
> >>
> >> While on a CGI thread...
> >>
> >> I'm considering trying to move my server app to a script-only implementation.
> >> However, I have a couple of crucial externals which need to be a part of it.
> >> Porting these to the operating systems on which I need them is not a problem
> >> (albeit some work), but I seem to recall that there is no way to use
> >> externals with CGI scripts. I can imagine good reasons for this, but is there
> >> any work-around? For example, I'd like to run things as script-only on a
> >> Darwin system. I can compile mach-o tools, but can I run them from inside a
> >> MC script? Has anyone been down this road before who can point me in the
> >> right direction? What if my externals need to maintain static/global
> >> information? My ultimate goal is an apache/metacard combo with no GUI...
> >> anyone that can give me some input?
> >
> > Brian, your best bet for something like this is to have cgi scripts
> > communicate with a long-running stack which in turn uses the externals,
> > I think.
> >
> 
> You could call the code with a shell command?
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: externals

2002-01-22 Thread David Bovill

Andu, is that a confirmation that mc/cgi script can't call externals? How
about if you "use" a stack which calls the externals?

> From: andu <[EMAIL PROTECTED]>
> Subject: Re: mc & cgi: externals
> 
> [EMAIL PROTECTED] wrote:
>> 
>> While on a CGI thread...
>> 
>> I'm considering trying to move my server app to a script-only implementation.
>> However, I have a couple of crucial externals which need to be a part of it.
>> Porting these to the operating systems on which I need them is not a problem
>> (albeit some work), but I seem to recall that there is no way to use
>> externals with CGI scripts. I can imagine good reasons for this, but is there
>> any work-around? For example, I'd like to run things as script-only on a
>> Darwin system. I can compile mach-o tools, but can I run them from inside a
>> MC script? Has anyone been down this road before who can point me in the
>> right direction? What if my externals need to maintain static/global
>> information? My ultimate goal is an apache/metacard combo with no GUI...
>> anyone that can give me some input?
> 
> Brian, your best bet for something like this is to have cgi scripts
> communicate with a long-running stack which in turn uses the externals,
> I think.
> 

You could call the code with a shell command?

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



RE: mc & cgi: limiting users to one visit

2002-01-21 Thread Chipp Walters

Merci, Monsieur Sahores,

Couple more questions if you don't mind...

1) Do you know of any current web applications running using MC-cgi?
2) What is "long running process" - is it a compiled MC app which acts as a
server and is already loaded in memory on the server?
3) Can MC run on NT or 2000 as a cgi? If so, do you know where I can find
info on how to set it up? I would like to run it on my laptop for building
web apps, and then port to a Linux server.
4) What do you mean by "use PHP as one of the best MC apps compliant sockets
listener."

and some help if you like:

Chris and I have created a stack called "altSAFileUp Library" which enables
users to upload files via the  to a server. If you have an
MC client app and wish to upload a file to a server, you can use this
library to do so. It creates the correct headers for all the form data on a
page, including multiple files, and uploads them in binary mode to the
server. While I've only tested it with the SAFileUp control, it should work
with any other server file upload controls on Mac, PC and Linux. Use it if
you like.

-Chipp


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Pierre Sahores
Sent: Monday, January 21, 2002 4:25 PM
To: [EMAIL PROTECTED]
Subject: Re: mc & cgi: limiting users to one visit


Chipp Walters a écrit :
>
> Andu,
>
> Quick question. Have you done any speed/load tests using MC-cgi vs PHP or
> ASP? Can one consider MC-cgi a robust, web-application development tool
like
> ASP and PHP? I know it doesn't do inline scripting like ASP and PHP, but I
> was wondering if I could use it on a Windows System for building small web
> apps.
>
> thx,
>
> Chipp Walters
>
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

Hi Chipp,

MC is a perfect tool to build web applications and to link flat-files
and sql-based databases to the internet (My prefered tools : PostGreSQL
as the db, SQLBoss 1.1 as the db designing ide, PHP4 as the gateway
between the MC "POST" queries and the PostGreSQL replies). I'm using MC
(2.32 for yet) in this way since about the last tree years. I'm spending
some time to build an example stack but it's not out for yet. In between
the far "marketed dead" ColdFusion and the J2EE based web apps servers,
MC is, at least, a "must know how to do with it" web development tool.

About speed : using, last year, the same PII 300 laptop to run the same
end-user app under WinNT4 SP5 and Suse-Linux 6.x, i founded that the
ASP2 drived app was 4 times many slower on the NT platform than the PHP
3.0.16 same drived app on the Suse platform. The MC 2.32 issue of the
same app is always many faster than the PHP3 issue is, on both the WinNT
and the Suse platform. The difference will grow more and more with the
length of the scripts to run : with small scripts, no big diffrence in
speed between MC and PHP ; with long scripts, MC will be up to 100 times
faster than PHP3 and 75 time faster than PHP4.

You will find in the list archive ways to handle MC based web apps as
long running processes. Don't forget that you can, if needed, use PHP as
one of the best MC apps compliant sockets listener. Have fun.

Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: limiting users to one visit

2002-01-21 Thread Pierre Sahores

Chipp Walters a écrit :
> 
> Andu,
> 
> Quick question. Have you done any speed/load tests using MC-cgi vs PHP or
> ASP? Can one consider MC-cgi a robust, web-application development tool like
> ASP and PHP? I know it doesn't do inline scripting like ASP and PHP, but I
> was wondering if I could use it on a Windows System for building small web
> apps.
> 
> thx,
> 
> Chipp Walters
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

Hi Chipp,

MC is a perfect tool to build web applications and to link flat-files
and sql-based databases to the internet (My prefered tools : PostGreSQL
as the db, SQLBoss 1.1 as the db designing ide, PHP4 as the gateway
between the MC "POST" queries and the PostGreSQL replies). I'm using MC
(2.32 for yet) in this way since about the last tree years. I'm spending
some time to build an example stack but it's not out for yet. In between
the far "marketed dead" ColdFusion and the J2EE based web apps servers,
MC is, at least, a "must know how to do with it" web development tool.

About speed : using, last year, the same PII 300 laptop to run the same
end-user app under WinNT4 SP5 and Suse-Linux 6.x, i founded that the
ASP2 drived app was 4 times many slower on the NT platform than the PHP
3.0.16 same drived app on the Suse platform. The MC 2.32 issue of the
same app is always many faster than the PHP3 issue is, on both the WinNT
and the Suse platform. The difference will grow more and more with the
length of the scripts to run : with small scripts, no big diffrence in
speed between MC and PHP ; with long scripts, MC will be up to 100 times
faster than PHP3 and 75 time faster than PHP4.

You will find in the list archive ways to handle MC based web apps as
long running processes. Don't forget that you can, if needed, use PHP as
one of the best MC apps compliant sockets listener. Have fun.

Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: externals

2002-01-21 Thread andu

[EMAIL PROTECTED] wrote:
> 
> While on a CGI thread...
> 
> I'm considering trying to move my server app to a script-only implementation.
> However, I have a couple of crucial externals which need to be a part of it.
> Porting these to the operating systems on which I need them is not a problem
> (albeit some work), but I seem to recall that there is no way to use
> externals with CGI scripts. I can imagine good reasons for this, but is there
> any work-around? For example, I'd like to run things as script-only on a
> Darwin system. I can compile mach-o tools, but can I run them from inside a
> MC script? Has anyone been down this road before who can point me in the
> right direction? What if my externals need to maintain static/global
> information? My ultimate goal is an apache/metacard combo with no GUI...
> anyone that can give me some input?

Brian, your best bet for something like this is to have cgi scripts
communicate with a long-running stack which in turn uses the externals,
I think.

> 
> TIA,
> Brian Yennie
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



mc & cgi: externals

2002-01-21 Thread Yennie

While on a CGI thread...

I'm considering trying to move my server app to a script-only implementation. 
However, I have a couple of crucial externals which need to be a part of it. 
Porting these to the operating systems on which I need them is not a problem 
(albeit some work), but I seem to recall that there is no way to use 
externals with CGI scripts. I can imagine good reasons for this, but is there 
any work-around? For example, I'd like to run things as script-only on a 
Darwin system. I can compile mach-o tools, but can I run them from inside a 
MC script? Has anyone been down this road before who can point me in the 
right direction? What if my externals need to maintain static/global 
information? My ultimate goal is an apache/metacard combo with no GUI... 
anyone that can give me some input?

TIA,
Brian Yennie
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: limiting users to one visit

2002-01-20 Thread andu

Chipp Walters wrote:
> 
> Andu,
> 
> Quick question. Have you done any speed/load tests using MC-cgi vs PHP or
> ASP? Can one consider MC-cgi a robust, web-application development tool like
> ASP and PHP? I know it doesn't do inline scripting like ASP and PHP, but I
> was wondering if I could use it on a Windows System for building small web
> apps.

Sure you can and it's fast.

> 
> thx,
> 
> Chipp Walters
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



RE: mc & cgi: limiting users to one visit

2002-01-20 Thread Chipp Walters

Andu,

Quick question. Have you done any speed/load tests using MC-cgi vs PHP or
ASP? Can one consider MC-cgi a robust, web-application development tool like
ASP and PHP? I know it doesn't do inline scripting like ASP and PHP, but I
was wondering if I could use it on a Windows System for building small web
apps.

thx,

Chipp Walters

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: limiting users to one visit

2002-01-19 Thread Nikorasu Kweto
Andu wrote back:

> > on startup
> >   if $REQUEST_METHOD is "POST" then
> >put $REMOTE_ADDRESS into userAddress
>
> This should be $REMOTE_ADDR not $REMOTE_ADDRESS, my mistake and Apache's
> inconsistency

Thanks Andu.

The following also works and was inspired by the echo.mt script:

--
repeat for each item i in the globals
   if i = "$REMOTE_ADDR" or i = "$REMOTE_ADDRESS" then
 put value(i) into userAddress
   end if
  end repeat
-

As all can see, yes, the actual name is $REMOTE_ADDR and, yes, I'm on
Apache.

Hope this may be of use to someone else in future.

Cheers.

---
 Nicolas Cueto|
 - Kinjo Gakuin University | ".. You may know KungFu,
 - Nagoya Keizai University   |but I know sendmail! .."
 Takakura Jr/Sr High   |
 - ETJ-Aichi, Sys Admin   |http://kweto.com
---


---
Outgoing mail is certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: mc & cgi: limiting users to one visit

2002-01-19 Thread andu

Nikorasu Kweto wrote:
> 
> Andu (thankfully!) wrote:
> 
> > That's right, you can keep track of the global $REMOTE_ADDRESS such as
> >
> > on startup
> > put $REMOTE_ADDRESS into userAddress
> 
> Sorry but this didn't work.
> 
> Here's the relevant portion of my script:
> 
> -
> #!mc
> global userAddress
> 
> on startup
>   if $REQUEST_METHOD is "POST" then
>put $REMOTE_ADDRESS into userAddress

This should be $REMOTE_ADDR not $REMOTE_ADDRESS, my mistake and Apache's
inconsistency.

>read from stdin until empty
>put it after buffer
>   end if
> 
>  put buffer & cr & userAddres into tData
>  put tData into url "file:results.txt"
> 
>   -- etc etc
> end startUp
> --
> 
> I tried re-positioning the $REMOTE_ADDRESS elsewhere in the script, but
> always only "buffer" gets writ onto the file (plus a cr).
> 
> Any idea where I've gone amiss?
> 
> Cheers.
> 
> ---
>  Nicolas Cueto|
>  - Kinjo Gakuin University | ".. You may know KungFu,
>  - Nagoya Keizai University   |but I know sendmail! .."
>  Takakura Jr/Sr High   |
>  - ETJ-Aichi, Sys Admin   |http://kweto.com
> ---
> 
> ---
> Outgoing mail is certified virus free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: mc & cgi: limiting users to one visit

2002-01-19 Thread Nikorasu Kweto
Andu (thankfully!) wrote:

> That's right, you can keep track of the global $REMOTE_ADDRESS such as
>
> on startup
> put $REMOTE_ADDRESS into userAddress

Sorry but this didn't work.

Here's the relevant portion of my script:

-
#!mc
global userAddress

on startup
  if $REQUEST_METHOD is "POST" then
   put $REMOTE_ADDRESS into userAddress
   read from stdin until empty
   put it after buffer
  end if

 put buffer & cr & userAddres into tData
 put tData into url "file:results.txt"

  -- etc etc
end startUp
--

I tried re-positioning the $REMOTE_ADDRESS elsewhere in the script, but
always only "buffer" gets writ onto the file (plus a cr).

Any idea where I've gone amiss?

Cheers.

---
 Nicolas Cueto|
 - Kinjo Gakuin University | ".. You may know KungFu,
 - Nagoya Keizai University   |but I know sendmail! .."
 Takakura Jr/Sr High   |
 - ETJ-Aichi, Sys Admin   |http://kweto.com
---


---
Outgoing mail is certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: mc & cgi: limiting users to one visit

2002-01-19 Thread andu

Nikorasu Kweto wrote:
> 
> Hi,
> 
> I've set up an online .mt-based survey. Now, I  want to restrict
> (mischievous!) people who may want to revisit the survey in order to vote
> again and again. How could I script things so that .mt checks whether a
> person/computer has already voted?
> 
> I'm guessing the solution has something to do with user url info sent in the
> http headers via a form during a "$REQUEST_METHOD = POST"...

That's right, you can keep track of the global $REMOTE_ADDRESS such as

on startup
put $REMOTE_ADDRESS into userAddress
...

> 
> In the meantime, back to the MC archives...
> 
> Thank you.
> 
> Cheers.
> 
> ---
>  Nicolas Cueto|
>  - Kinjo Gakuin University | ".. You may know KungFu,
>  - Nagoya Keizai University   |but I know sendmail! .."
>  Takakura Jr/Sr High   |
>  - ETJ-Aichi, Sys Admin   |http://kweto.com
> ---
> 
> ---
> Outgoing mail is certified virus free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 
__
 Regards, Andu
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



mc & cgi: limiting users to one visit

2002-01-18 Thread Nikorasu Kweto
Hi,

I've set up an online .mt-based survey. Now, I  want to restrict
(mischievous!) people who may want to revisit the survey in order to vote
again and again. How could I script things so that .mt checks whether a
person/computer has already voted?

I'm guessing the solution has something to do with user url info sent in the
http headers via a form during a "$REQUEST_METHOD = POST"...

In the meantime, back to the MC archives...

Thank you.

Cheers.

---
 Nicolas Cueto|
 - Kinjo Gakuin University | ".. You may know KungFu,
 - Nagoya Keizai University   |but I know sendmail! .."
 Takakura Jr/Sr High   |
 - ETJ-Aichi, Sys Admin   |http://kweto.com
---


---
Outgoing mail is certified virus free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.314 / Virus Database: 175 - Release Date: 2002/01/11

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard


Re: Using stacks in MC CGI scripts: experience of (1)...

2001-04-16 Thread andu

David Bovill wrote:
> 
> OK not quite clear... (Linux novice -:)

> > You can if they are written to a .mt file.
> 
> Can be any file name as long as the permissions are set to execute and the
> file is on the $PATH right?

If you're not in the directory with the file you have to point to it (%
mc /home/users/www/cgi-bin/script.mt)  "%, $, #" stay for the promt sign
which in my case is # (they are not part of your command). If the
application is not on the $PATH you must  point to it; same for the
script file: 
% /usr/local/bin/mc /home/users/www/script.mt
If you're in the same directory with mc and mc is not on the $PATH you
do:
%./mc script.mt  (or the path to the script).

> 
> > % ./mc script.mt # will execute the script.
> 
> Has this come through the email correct? What do I issue from an MC .mt CGI
> script (or other CGI language? Lets take MC as an example:
> 
>  put shell("% ./mc script.mt") into mcShellResult

So, if mc is on the path you do:
put shell("mc /path/to/the/script.mt")
The preffix of the file can be anything not just .mt.
> 
> > Doing:
> > % ./mc stack.mc #will try to open MC in X and not succeed.
> 
> OK
> 
> Thanks again.

You're welcome.

Andu

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts: experience of (1)...

2001-04-16 Thread David Bovill

OK not quite clear... (Linux novice -:)

> From: andu <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Mon, 16 Apr 2001 15:42:07 -0400
> To: [EMAIL PROTECTED]
> Subject: Re: Using stacks in MC CGI scripts: experience of (1)...
> 
> You can if they are written to a .mt file.

Can be any file name as long as the permissions are set to execute and the
file is on the $PATH right?

> % ./mc script.mt # will execute the script.

Has this come through the email correct? What do I issue from an MC .mt CGI
script (or other CGI language? Lets take MC as an example:

 put shell("% ./mc script.mt") into mcShellResult


> Doing:
> % ./mc stack.mc #will try to open MC in X and not succeed.

OK

Thanks again.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts: experience of (1)...

2001-04-16 Thread andu

David Bovill wrote:
> 
> Thanks Andu,
> 
> got it working (with your help). I had made a number of mistakes...
> 
> 1) The function had a mistake:
> 
> function getData
>-- put return & fld 1 into someData
>   put return & fld 1 of stack "database" into someData
>   return someData
> end getData
> 
> Basic mistake, but as the script is being used, it had no idea of which
> stack the field was in - so a stack reference was needed. However you can
> call the functions direct (which is a relief for me 'coz my libraries are
> mainly functions).
> 
> Seem to be able to parameters in the expected way. However I've run into a
> problem which seems to be to do with the home stack... pretty sure it is not
> corrupted or anything as it works locally and I am using the same technique
> to transfer it as the other stacks... - I think it is *that* lovely splash
> screen -:)
> 
> Why would I want to use the home stack

Good question.

> - maybe I don't need to, but when
> exploring shell commands, I decided to see if I could use MC shell commands
> and call them from the CGI...
> 
> Stuff like (calling standard shell scripts on Linux serveer):
> 
>   -- put shell("whereis sh") after buffer
>   -- put return after buffer
> 
>   -- put shell("whereis mc") after buffer
>   -- put return after buffer
> 
>   -- put shell("whereis perl") after buffer
>   -- put return & return after buffer
> 
> Works a treat in the CGI, but when I tried to use MC based scripts...
> 
> First I got back that sh (the shell interpreter) couldn't handle it, so I
> needed to change the shellCommand...
> 
>   -- set the shellcommand to "mc"
> 
> to which I get back...
> 
>   -- ...mcPath: Can't open display
>   -- ...mcPath: Can't load stack or script mchome.mc
> 
> Which brings me on th the fact that with the home stack on the server and a
> couple of database stacks:
> 
>   -- put fld 1 of stack "database" into someData -- works fine
>   -- put fld 1 of stack "home" into someData -- gives a server error
> 
> So the question I am trying to answer is have I made another silly mistake
> or am I running into a brick wall as the home stack will not run on the
> server (display issue?) and consequently I won't be able to use MC based
> shell scripts?

You can if they are written to a .mt file.
% ./mc script.mt # will execute the script.
Doing:
% ./mc stack.mc #will try to open MC in X and not succeed.

> 
> Maybe I'll have to dig out that SSH Telnet client? Any help from the experts
> out there appreciated...
> 
> David
Andu

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Using stacks in MC CGI scripts: experience of (1)...

2001-04-16 Thread David Bovill

Thanks Andu, 

got it working (with your help). I had made a number of mistakes...

1) The function had a mistake:

function getData
   -- put return & fld 1 into someData
  put return & fld 1 of stack "database" into someData
  return someData
end getData

Basic mistake, but as the script is being used, it had no idea of which
stack the field was in - so a stack reference was needed. However you can
call the functions direct (which is a relief for me 'coz my libraries are
mainly functions). 

Seem to be able to parameters in the expected way. However I've run into a
problem which seems to be to do with the home stack... pretty sure it is not
corrupted or anything as it works locally and I am using the same technique
to transfer it as the other stacks... - I think it is *that* lovely splash
screen -:)

Why would I want to use the home stack - maybe I don't need to, but when
exploring shell commands, I decided to see if I could use MC shell commands
and call them from the CGI...

Stuff like (calling standard shell scripts on Linux serveer):

  -- put shell("whereis sh") after buffer
  -- put return after buffer
  
  -- put shell("whereis mc") after buffer
  -- put return after buffer

  -- put shell("whereis perl") after buffer
  -- put return & return after buffer

Works a treat in the CGI, but when I tried to use MC based scripts...

First I got back that sh (the shell interpreter) couldn't handle it, so I
needed to change the shellCommand...

  -- set the shellcommand to "mc"

to which I get back...

  -- ...mcPath: Can't open display
  -- ...mcPath: Can't load stack or script mchome.mc

Which brings me on th the fact that with the home stack on the server and a
couple of database stacks:

  -- put fld 1 of stack "database" into someData -- works fine
  -- put fld 1 of stack "home" into someData -- gives a server error


So the question I am trying to answer is have I made another silly mistake
or am I running into a brick wall as the home stack will not run on the
server (display issue?) and consequently I won't be able to use MC based
shell scripts?

Maybe I'll have to dig out that SSH Telnet client? Any help from the experts
out there appreciated...

David


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts...

2001-04-16 Thread andu

David Bovill wrote:
> 
> > From: andu <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Mon, 16 Apr 2001 08:55:18 -0400
> > To: [EMAIL PROTECTED]
> > Subject: Re: Using stacks in MC CGI scripts...
> >
> > David Bovill wrote:
> >>
> >> -- start using stack "database.mc"  -- no problem but...
> >
> > Start using "database" should be enough.
> >
> >> -- put getData() into buffer -- error
> >
> > Be aware that the 2 stacks don't share local variables. One stack does
> > getData() and "returns" stuff, the other, gets stuff in "the result".
> >
> >>
> >> Now getData() is a very simple function in the stack script of the MC stack
> >> "database.mc" on the server - it just return "hello"

> Hi Andu...
> 
> I don't have two stacks... just the one and it is being "used" in the .mt
> script - by the "start using stack ..." line.

Same thing.

> 
> However i can't use any of the functions in this stacks script even though I
> can reference it's fields and data

So, the syntax is the problem.
 After you "start using" a stack do a handler in the stack not a
function.
In your .mt file:

...start using "database"
getMyStuff
put the result
...

In your stack script:

on getMyStuff
put getData() into buffer
return buffer
end getMyStuff

function getData()
#stuff
end getData

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts...

2001-04-16 Thread David Bovill



> From: andu <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Mon, 16 Apr 2001 08:55:18 -0400
> To: [EMAIL PROTECTED]
> Subject: Re: Using stacks in MC CGI scripts...
> 
> David Bovill wrote:
>> 
>> -- start using stack "database.mc"  -- no problem but...
> 
> Start using "database" should be enough.
> 
>> -- put getData() into buffer -- error
> 
> Be aware that the 2 stacks don't share local variables. One stack does
> getData() and "returns" stuff, the other, gets stuff in "the result".
> 
>> 
>> Now getData() is a very simple function in the stack script of the MC stack
>> "database.mc" on the server - it just return "hello"
>> 
>> I am not clear what can and can't be done with these scripts as I had
>> largely worked with MC based server stuff where it is all possible, so
>> anyone help with my confusion???
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Hi Andu...

I don't have two stacks... just the one and it is being "used" in the .mt
script - by the "start using stack ..." line.

However i can't use any of the functions in this stacks script even though I
can reference it's fields and data


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts...

2001-04-16 Thread andu

David Bovill wrote:
> 
> OK getting back to some CGI stuff...
> 
> Help from all you experts out there required.  I have an MC based CGI
> working but when I use the following lines within the standard "echo.mt"
> test script I get errors:
> 
>   -- go to stack "database.mc" -- error

Go wants to "open" a stack which you probably don't want.

> 
>   -- start using stack "database.mc"  -- no problem but...

Start using "database" should be enough.

>   -- put getData() into buffer -- error

Be aware that the 2 stacks don't share local variables. One stack does
getData() and "returns" stuff, the other, gets stuff in "the result".

> 
> Now getData() is a very simple function in the stack script of the MC stack
> "database.mc" on the server - it just return "hello"
> 
> I am not clear what can and can't be done with these scripts as I had
> largely worked with MC based server stuff where it is all possible, so
> anyone help with my confusion???
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Andu

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: Using stacks in MC CGI scripts...

2001-04-16 Thread andu

David Bovill wrote:
> 
> OK getting back to some CGI stuff...
> 
> Help from all you experts out there required.  I have an MC based CGI
> working but when I use the following lines within the standard "echo.mt"
> test script I get errors:
> 
>   -- go to stack "database.mc" -- error

Go wants to "open" a stack which you probably don't want.

> 
>   -- start using stack "database.mc"  -- no problem but...

Start using "database" should be enough.

>   -- put getData() into buffer -- error

Be aware that the 2 stacks don't share local variables. One stack does
getData() and "returns" stuff, the other, gets stuff in "the result".

> 
> Now getData() is a very simple function in the stack script of the MC stack
> "database.mc" on the server - it just return "hello"
> 
> I am not clear what can and can't be done with these scripts as I had
> largely worked with MC based server stuff where it is all possible, so
> anyone help with my confusion???
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Andu

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Using stacks in MC CGI scripts...

2001-04-16 Thread David Bovill

OK getting back to some CGI stuff...

Help from all you experts out there required.  I have an MC based CGI
working but when I use the following lines within the standard "echo.mt"
test script I get errors:

  -- go to stack "database.mc" -- error

  -- start using stack "database.mc"  -- no problem but...
  -- put getData() into buffer -- error

Now getData() is a very simple function in the stack script of the MC stack
"database.mc" on the server - it just return "hello"

I am not clear what can and can't be done with these scripts as I had
largely worked with MC based server stuff where it is all possible, so
anyone help with my confusion???


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MC Cgi scripts

2000-12-20 Thread Sivakatirswami

What are some things people are doing with MC as a CGI engine?

Assuming we do get it installed on a UNIX server running Apache. . . are
their any scripts in the public domain that I can look at?

What are some things people are doing with MC as a CGI?

Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
www.HinduismToday.com
www.HimalayanAcademy.com
[EMAIL PROTECTED]


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: mc cgi configuration

2000-12-16 Thread andu


>> what I know you need to be able to install and run an
>> executable (as Andu says somewhere on the "path" - nt a spiritual reference
>> I believe -:). The server then needs to be set up to understand that the .mt
>> or whatever you call them scripts/or anything is such and such a folder is
>> to be executed (a permissions thing) by the MC engine.
>> 
>> In other words they may have to add about two words to some config file
>> somewhere on the server side - this naturally enough takes about 2 days work
>> and cost's an arm and a leg to those of us who don't know what we are doing.
>> It's a mechanic thing -:)
>
>OK well, thanks. . .we are getting a bit closer but I don't think the above
>constitutes a message to a sys op that he can say yea or nay on. . .any more
>specific comments?
>
>
>What exactly is installed? The Unix version of MC?

All you need to install is the engine specific for their platform in your /cgi-bin 
directory.
The actual script files can have *any suffix (if they want .cgi make it so) they will 
call MC
regardless (#!mc). My advice to you is to set up a Linux box (PC or LinuxPPC) and test
everything for yourself.

>
>Hinduism Today
>
>Sivakatirswami


Regards, Andu 
___
[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-25 Thread Pierre Sahores

andu a écrit :
> 
> >
> >I would chip in for some Metacard based server hosting. I'd want to be able
> >to use my own DNS server, and I'd only need a few MB disk space?
> >
> >Anyone else???
> Every mc user who respects her/himself should have a metacard web presence.
> Just imagine,  "Powerd by MetaCard!".

Wy, Just imagine ? Even if the clients don't want the "Powered by Metacard" on
theyr servers, i'm still deploying mc applications servers on 3 different basis
: MacOS, Linux, WinNT4. You can see the last one at
 (WinNT4,IIS4,PHP4,Metacard 2.3.1), first, builted on Linux
and, second, deployed under WinNT4 because the client wants so...

I hope to be able to open free mc.cgi directories to the list (virtual hosting,
academic uses only), on a Linux/Apache server, in the next months...

Best Regards, Pierre

> 
> Regards, Andu
> ___
> [EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.

-- 
Pierre Sahores

chef de projet cyberlibrairie
SNPIN - CNDP. 91, rue Gabriel-Peri
92120 Montrouge. Tél.: 01.64.45.05.33

Penser la part du rêve et
produire l'avantage compétitif.

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-24 Thread andu

>
>I would chip in for some Metacard based server hosting. I'd want to be able
>to use my own DNS server, and I'd only need a few MB disk space?
>
>Anyone else???
Every mc user who respects her/himself should have a metacard web presence.
Just imagine,  "Powerd by MetaCard!".


Regards, Andu 
___
[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-24 Thread David Bovill

I would chip in for some Metacard based server hosting. I'd want to be able
to use my own DNS server, and I'd only need a few MB disk space?

Anyone else???

> From: Simon Lord <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 23 Nov 2000 08:27:11 -0500
> To: [EMAIL PROTECTED]
> Subject: Re: MC cgi
> 
> We have a server that could do this, I'm sure Kevin and a few others could
> also do it.  I was going to get around to asking Andu, Scott and others what
> the requirements would actually be before offering this service.
> 
> We are in the process of upgrading to a 40gig disk and 512RAM server on our
> tiny 155 Mbit connection ;)  (Linux Server)
> 
> If there are enough interested parties then I'm sure our hosting company
> would welcome you, we have pricing up on our hosting page and everything is
> always in CANADIAN funds so our US and overseas clients end up paying less.
> See the link below (use the test mode site and find pricing under *hosting*
> link).
> 
> --
> 
> Cheers,
> Simon
> 
> Graphic Development: http://www.amigo-3.com/
> 
> (new site in test mode) http://www.amigo-3.com/newamigo
> 
> --
> "The great discoveries in science are not punctuated by 'Eureka! I've found
> it!' but rather "Hmmm,that's funny" Isaac Asimov
> 
>> From: "Monte Goulding" <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> Date: Thu, 23 Nov 2000 23:20:56 +1030
>> To: [EMAIL PROTECTED]
>> Subject: MC cgi
>> 
>> Hi all
>> 
>> All this talk about internet capabilities is making me thirsty for
>> knowledge. This question is probably more related to my lack of
>> understanding of web servers that any thing else.
>> 
>> Is it possible to use metacard as a server on a web hosted by a third party?
>> ie I assume I can't get my ISP to host my web and place mc in it to run cgi
>> and mt scripts.
>> 
>> Regards
>> 
>> Monte
>> 
>> 

_>> _
>> ___
>> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
>> 
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>> 
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-23 Thread George Wade


Monte,
I'm just sending an application to Digital Forest for Mac web hosting. $20 
a month for 100MB disc space ---

There is also the possibility of having a server purchased and cared for. The server 
is only $5,000; financing can be facilitated. The care and feeding of said server is 
probably reasonable but I didn't ask...   It will all cost less by the time I both 
really need and can afford it.

Your own server is where you could most likely get a friendly hosting service to 
install MC to be clown and wizard.

Now if there are other possibilities.?

George Wade,
Kochi,
Japan

On November 24 2000, Monte Goulding <[EMAIL PROTECTED]> wrote:
>
>Hi all
>
>All this talk about internet capabilities is making me thirsty ...
>
>Is it possible to use metacard as a server on a web hosted by a third party?  ie I 
>assume I can't get my ISP to host my web and place mc in it to run cgi and mt scripts.
>
>Regards
>
>Monte



Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-23 Thread Simon Lord

There are a few exceptions...;P

--

Cheers,
Simon

Graphic Development: http://www.amigo-3.com

--
"The great discoveries in science are not punctuated by 'Eureka! I've found
it!' but rather "Hmmm,that's funny" Isaac Asimov

> From: "Monte Goulding" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Fri, 24 Nov 2000 00:08:19 +1030
> To: [EMAIL PROTECTED]
> Subject: Re: MC cgi
> 
> Would it be impractical to use a Canadian host for an Australian company. I
> think the $ conversion wouldn't work out well fo me either. I'm really
> asking how this stage.
> 
> Regards
> 
> Monte
> - Original Message -
> From: "Simon Lord" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 23, 2000 11:57 PM
> Subject: Re: MC cgi
> 
> 
>> We have a server that could do this, I'm sure Kevin and a few others could
>> also do it.  I was going to get around to asking Andu, Scott and others
> what
>> the requirements would actually be before offering this service.
>> 
>> We are in the process of upgrading to a 40gig disk and 512RAM server on
> our
>> tiny 155 Mbit connection ;)  (Linux Server)
>> 
>> If there are enough interested parties then I'm sure our hosting company
>> would welcome you, we have pricing up on our hosting page and everything
> is
>> always in CANADIAN funds so our US and overseas clients end up paying
> less.
>> See the link below (use the test mode site and find pricing under
> *hosting*
>> link).
>> 
>> --
>> 
>> Cheers,
>> Simon
>> 
>> Graphic Development: http://www.amigo-3.com/
>> 
>> (new site in test mode) http://www.amigo-3.com/newamigo
>> 
>> ------
>> "The great discoveries in science are not punctuated by 'Eureka! I've
> found
>> it!' but rather "Hmmm,that's funny" Isaac Asimov
>> 
>>> From: "Monte Goulding" <[EMAIL PROTECTED]>
>>> Reply-To: [EMAIL PROTECTED]
>>> Date: Thu, 23 Nov 2000 23:20:56 +1030
>>> To: [EMAIL PROTECTED]
>>> Subject: MC cgi
>>> 
>>> Hi all
>>> 
>>> All this talk about internet capabilities is making me thirsty for
>>> knowledge. This question is probably more related to my lack of
>>> understanding of web servers that any thing else.
>>> 
>>> Is it possible to use metacard as a server on a web hosted by a third
> party?
>>> ie I assume I can't get my ISP to host my web and place mc in it to run
> cgi
>>> and mt scripts.
>>> 
>>> Regards
>>> 
>>> Monte
>>> 
>>> 
> 
> __
>>> ___
>>> Get more from the Web.  FREE MSN Explorer download :
> http://explorer.msn.com
>>> 
>>> 
>>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>>> 
>> 
>> 
>> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
>> Info: http://www.xworlds.com/metacard/mailinglist.htm
>> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>> 
>> 
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-23 Thread Monte Goulding

Would it be impractical to use a Canadian host for an Australian company. I
think the $ conversion wouldn't work out well fo me either. I'm really
asking how this stage.

Regards

Monte
- Original Message -
From: "Simon Lord" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 23, 2000 11:57 PM
Subject: Re: MC cgi


> We have a server that could do this, I'm sure Kevin and a few others could
> also do it.  I was going to get around to asking Andu, Scott and others
what
> the requirements would actually be before offering this service.
>
> We are in the process of upgrading to a 40gig disk and 512RAM server on
our
> tiny 155 Mbit connection ;)  (Linux Server)
>
> If there are enough interested parties then I'm sure our hosting company
> would welcome you, we have pricing up on our hosting page and everything
is
> always in CANADIAN funds so our US and overseas clients end up paying
less.
> See the link below (use the test mode site and find pricing under
*hosting*
> link).
>
> --
>
> Cheers,
> Simon
>
> Graphic Development: http://www.amigo-3.com/
>
> (new site in test mode) http://www.amigo-3.com/newamigo
>
> --
> "The great discoveries in science are not punctuated by 'Eureka! I've
found
> it!' but rather "Hmmm,that's funny" Isaac Asimov
>
> > From: "Monte Goulding" <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Thu, 23 Nov 2000 23:20:56 +1030
> > To: [EMAIL PROTECTED]
> > Subject: MC cgi
> >
> > Hi all
> >
> > All this talk about internet capabilities is making me thirsty for
> > knowledge. This question is probably more related to my lack of
> > understanding of web servers that any thing else.
> >
> > Is it possible to use metacard as a server on a web hosted by a third
party?
> > ie I assume I can't get my ISP to host my web and place mc in it to run
cgi
> > and mt scripts.
> >
> > Regards
> >
> > Monte
> >
> >

__
> > ___
> > Get more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com
> >
> >
> > Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> > Info: http://www.xworlds.com/metacard/mailinglist.htm
> > Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> >
>
>
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>
>


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-23 Thread Kevin Miller

On 23/11/00 12:50 pm, Monte Goulding <[EMAIL PROTECTED]> wrote:

> Is it possible to use metacard as a server on a web hosted by a third party?
> ie I assume I can't get my ISP to host my web and place mc in it to run cgi
> and mt scripts.

Yes, but only with some ISPs.  You need to ask them if you can run an
executable on their server: and the vast majority will say no.  It tends to
be possible when you have a dedicated server package, though those are more
expensive and require lots of maintenance (thats what we use).

Regards,

Kevin

Kevin Miller <[EMAIL PROTECTED]> 
Runtime Revolution Limited (formerly Cross Worlds Computing).
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




Re: MC cgi

2000-11-23 Thread Simon Lord

We have a server that could do this, I'm sure Kevin and a few others could
also do it.  I was going to get around to asking Andu, Scott and others what
the requirements would actually be before offering this service.

We are in the process of upgrading to a 40gig disk and 512RAM server on our
tiny 155 Mbit connection ;)  (Linux Server)

If there are enough interested parties then I'm sure our hosting company
would welcome you, we have pricing up on our hosting page and everything is
always in CANADIAN funds so our US and overseas clients end up paying less.
See the link below (use the test mode site and find pricing under *hosting*
link).

--

Cheers,
Simon

Graphic Development: http://www.amigo-3.com/

(new site in test mode) http://www.amigo-3.com/newamigo

--
"The great discoveries in science are not punctuated by 'Eureka! I've found
it!' but rather "Hmmm,that's funny" Isaac Asimov

> From: "Monte Goulding" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 23 Nov 2000 23:20:56 +1030
> To: [EMAIL PROTECTED]
> Subject: MC cgi
> 
> Hi all
> 
> All this talk about internet capabilities is making me thirsty for
> knowledge. This question is probably more related to my lack of
> understanding of web servers that any thing else.
> 
> Is it possible to use metacard as a server on a web hosted by a third party?
> ie I assume I can't get my ISP to host my web and place mc in it to run cgi
> and mt scripts.
> 
> Regards
> 
> Monte
> 
> __
> ___
> Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
> 
> 
> Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
> 


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.




MC cgi

2000-11-23 Thread Monte Goulding

Hi all

All this talk about internet capabilities is making me thirsty for 
knowledge. This question is probably more related to my lack of 
understanding of web servers that any thing else.

Is it possible to use metacard as a server on a web hosted by a third party? 
ie I assume I can't get my ISP to host my web and place mc in it to run cgi 
and mt scripts.

Regards

Monte

_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.