• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleEvents, CGIs, Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleEvents, CGIs, Cocoa


  • Subject: Re: AppleEvents, CGIs, Cocoa
  • From: Chilton Webb <email@hidden>
  • Date: Sat, 26 Jan 2002 16:32:16 -0600

On Saturday, January 26, 2002, at 02:38 PM, email@hidden wrote:

On Saturday, January 26, 2002, at 12:57 PM, Chilton Webb wrote:

Here's a brain thumper...

I have a Cocoa app running a tool with NSTask. No problems. I have a Carbon app that talks to the Cocoa app via AppleEvents. No problems.

I wrote a tool that sends these events to the Cocoa app so that I could ultimately run it as a CGI with the same interface as the Carbon app. Problem. If I run it from the terminal, all is fine. If I run it from the server, I get the 500 Server Misconfiguration error. Any idea why?

You may have already considered this, but my experience has been that when you have a CGI program works "just fine" in the shell, but pukes up when its run by apache it is almost always because apache's execution environment for the CGI program in question cannot access the same path or libraries as the shell. You'll want to check that:

1) Apache CGI's can find the binaries you are using (PATH variable).
2) Apache CGI's have execute permissions on the binaries you are using.
3) Apache CGI's can dynamically link any shared libraries you are using.

If your CGI is a binary,you can also try wrapping it in a shell script that just exec's the binary and see what errors the shell gives you.

Tried it, it runs fine. The only problems are when I actually send the appleEvent.

I tried (in response to the other reply to this) to set its permissions and user to the same as the app. No change, it still works from the commandline, and not from the webserver.

I tried setting just the cocoa app to the www user, and again no change, the tool works great from the command line, not at all from the webserver, unless I remove the one line that sends the AppleEvents.

Now, this last thing I tried doesn't make much sense to me if there really is some kind of protection against sending AppleEvents between two apps that aren't of the same ilk. So now I'm really stumped.

Any ideas?

-Chilton


  • Follow-Ups:
    • Re: AppleEvents, CGIs, Cocoa
      • From: Chris Hanson <email@hidden>
References: 
 >Re: AppleEvents, CGIs, Cocoa (From: email@hidden)

  • Prev by Date: Re: How viable is Cocoa development?
  • Next by Date: [LONG] Making the right choice (was Re: How viable is Cocoa development?)
  • Previous by thread: Re: AppleEvents, CGIs, Cocoa
  • Next by thread: Re: AppleEvents, CGIs, Cocoa
  • Index(es):
    • Date
    • Thread