Re: 2.4.3 / cgi scripts
In a message dated 6/27/2002 7:39:12 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: << 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. >> It is. I forgot to mention something: if I install the engine in /usr/bin, it immediately crashes with a bus error whenever it is run. I will see if full paths help; however, the problem doesn't exist on the command line, and using a relative path to the Darwin engine works fine... Brian ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: 2.4.3 / cgi scripts
--On Thursday, June 27, 2002 17:08:45 -0600 Scott Raney <[EMAIL PROTECTED]> wrote: > On Fri, 21 Jun 2002 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] http://www.metacard.com > MetaCard: You know, there's an easier way to do that... > > > ___ > 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: 2.4.3 / cgi scripts
On Fri, 21 Jun 2002 [EMAIL PROTECTED] 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 > Brian Scott Raney [EMAIL PROTECTED] http://www.metacard.com MetaCard: You know, there's an easier way to do that... ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: 2.4.3 / cgi scripts
Already tried those- same behavior. Even if MetacardCarbon is called "mc", the problem persists. I've also configured apache to recognize the ".mt" extension. I guess the question simply put is: how do I make a bundled app on OS X the executable for a script? It only works when I run from the command line *and* execute the application with the script as a parameter (rather than just executing the script). Scott, the ReadME says this is enabled- do you have a formula for doing this? BTW, reading from stdin and writing to stdout do work nicely. Brian << See what happens if you rename MetacardCarbon to mc and put it in the same directory with the script and adjust the script accordingly. Also changing .mt to .cgi might be more to the liking of the server. >> ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: 2.4.3 / cgi scripts
--On Friday, June 21, 2002 17:02:56 -0400 [EMAIL PROTECTED] 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? See what happens if you rename MetacardCarbon to mc and put it in the same directory with the script and adjust the script accordingly. Also changing .mt to .cgi might be more to the liking of the server. > > Brian > ___ > 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
2.4.3 / cgi scripts
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? Brian ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard