2.4.3 / cgi scripts

andu undo at cloud9.net
Thu Jun 27 19:41:01 EDT 2002


--On Thursday, June 27, 2002 17:08:45 -0600 Scott Raney 
<raney at metacard.com> wrote:

> On Fri, 21 Jun 2002 Yennie at aol.com wrote:
>
>> I can't seem to figure out how to run a cgi script with 2.4.3.
>> The following works with MC/Darwin as a cgi script with apache:
>>
>> # !mc
>> # file: test.mt
>> on startup
>> ..
>> end startup
>>
>> After installing the MetacardCarbon/Mach-O bundle in the same directory,
>> I  can do this from the command line:
>>
>> ./MetacardCarbon.app/Contents/MacOS/MetacardCarbon test.mt
>>
>> And the script will run.
>> However, I can't seem to configure test.mt to run when called by cgi.
>> The following does *not* work as a cgi:
>>
>> # !./MetacardCarbon.app/Contents/MacOS/MetacardCarbon
>> # file: test.mt
>> on startup
>> ..
>> end startup
>>
>> I've tried creating a symbolic link named "mc" to
>> "./MetacardCarbon.app/Contents/MacOS/MetacardCarbon", but that doesn't
>> work  either (again, it works on the command line).
>>
>> Any ideas?
>
> The problem is that one of the hacks we had to put in that engine to
> deal with the fact that the Finder doesn't set up the environment
> properly interferes with running it from the command line.  For now,
> you've got to supply the full path for both the executable and for the
> script file to run on the command line.  There will be a workaround
> for this in the next build, but note that bundles are something that
> UNIX doesn't understand and so you should treat the engine executable
> like any other unix binary (i.e., you don't need any of that other
> stuff in the .app bundle to run it).
>   Regards,
>     Scott

He seems to have no problem running it on the command line but as cgi, 
which means that Apache must look for something like /cgi-bin/script.cgi. 
If I understand you correctly the script should have in it:
#!/full-path-to/mc-engine
in order for the script to find the engine but for some reason (I now 
notice) he has:
#!./some-path-to/mc-engine
as if the engine is in a folder *within* /cgi-bin.


>
>> Brian
>
> ********************************************************
> Scott Raney  raney at metacard.com  http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...
>
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>



Regards, Andu Novac



More information about the metacard mailing list