Re: Running /usr/bin/osascript via CGI scripts in Mac OS X


Subject: Re: Running /usr/bin/osascript via CGI scripts in Mac OS X
From: nathan r. hruby (nhruby@arches.uga.edu)
Date: Sun Mar 03 2002 - 11:40:26 MST


Is your apache setup using suExec? (look in /var/log/httpd/error_log for
the answer) If so, read this:
http://httpd.apache.org/docs/suexec.html

-n

On Sun, 3 Mar 2002, Zeke Runyon wrote:

> I know this is a Yellow Dog Linux list, but does anyone know what's
> wrong here:
>
> I have this Perl script:
>
> ---------------------
> #!/usr/bin/perl
>
> # osascript.cgi - test of using the /usr/bin/osascript program via CGI
>
> sub appleScript { # this runs AppleScript source code
> my $result = `/usr/bin/osascript -sh << 'END'\n$_[0]\nEND`;
> chomp $result;
> return $result;
> }
>
> # gets the current song playing in iTunes
> my $song = appleScript( qq{
> tell application "iTunes"
> name of current track
> end tell
> } );
>
> print "Content-type: text/html\n\n";
>
> if ($song) {
> print $song;
> } else {
> print "There was an error.\n";
> }
> ---------------------
>
> And it seems that the /usr/bin/osascript program won't run via CGI. The
> program is readable and executable by all. What's wrong here?
>
> z
>
> :::
>
> # Zeke Runyon, zrunyon@mac.com
> # web: http://communistsquirrel.home.dhs.org/ (formerly zekeworld)
> # linux: http://gloin.dyn.dhs.org/, email: zekemon@gloin.dyn.dhs.org
> # PGP key fingerprint = 7084 3BA2 9BC3 9024 2840 F0AF B9F4 37EB 827E
> 6A7D
> # ( i am ZEKE, squirrel king, lord of woodland fauna ! )
>

-- 
......
nathan hruby - nhruby@arches.uga.edu
computer support specialist
department of drama and theatre
http://www.drama.uga.edu/
......



This archive was generated by hypermail 2a24 : Sun Mar 03 2002 - 11:55:19 MST