[Metacard] Re: Darwin, CGI Question
andu
undo at cloud9.net
Fri Nov 23 12:18:00 EST 2001
Richard MacLemale wrote:
>
> Andu wrote,
> > The more empirical way: put home, tools and help stacks in the same
> > folder with the engine and do ./mc and see if metacard starts in gui.
> > Also try .cgi instead of .mt for the cgi file.
> > Test with a cgi known to work just in case the server may not have the
> > proper settings.
>
> That works. I wrote a text file named "test.mt" with a simple script which
> created a text file and put it in the same directory (in this case
> CGI-Executables) as mc and the other stacks. The first line of the file is
> "#!mc" followed by "on startup" and then the script. Then in command line,
> I typed ./mc test.mt, and wonder of wonders, the script was instantly run
> and the text file was created. Cool!
>
> Making the jump to being able to active the test.mt script via CGI, however,
> is not working. Both the test.mt file and mc have proper permissions (755).
> I've got a test shell script which works fine when called from a browser.
> But when I attempt to hit the test.mt script, no dice. Renaming the script
> to test.cgi does not help.
>
> One thing - I can run my test shell script (named echo.sh) by typing:
> sh echo.sh
>
> in the command line. But typing
>
> mc test.mt
>
> in the command line will not run the test.mt script, yet typing
>
> ./mc test.mt
>
> in the command line does. Being a UNIX newbie, I don't know what the ./
> does, but you can't execute without it. So perhaps this has something to do
> with not being able to execute a script from a browser?
No, if you are in a directory (cd /dir) ./ means you want to execute
stuff from *that* directory. If you put mc in a directory listed in
$PATH (probably /usr/bin or /bin) it will do the same like sh.
>
> I gotta believe that at least one MetaCard developer has already done all
> this. I can't be the first person to try to run MetaCard Darwin engine on
> OS X as a replacement for Perl, can I? :)
>
> This is SOOOOOOOOO close and yet so far. The idea of, on OS X, being able
> to run METACARD scripts is so cool I can hardly sleep at night.
>
> Anyone have any further suggestions, or is this the end of the line?
>
> :)
> Richard MacLemale
> Instructional Technology Specialist
> James W. Mitchell High School
>
Andu
Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <bugs at metacard.com>, not this list.
More information about the metacard
mailing list