I have a project in which I am trying to create a web interface to control and ARD server. What I am trying to do is have a web interface (through apache and php) run applescript which controls ARD which then controls computers in a lab environment. I have gotten as far is writing the entire web front end, but I can't get php to run osascript to do the applescripts. I have tried changing apache's user to an administrator and have verfied that change was accepted by doing a phpinfo();. I get no error and no feedback from a line like this
osascript has large limitation in that it can only run as root or as the currently logged in user. If you were to try and run the command manually, as such:
/usr/bin/sudo -u www osascript scripts/test.scpt
You would get the error:
kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
pHp and Osascript
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.