I am running iTunes, 10.6.1 on my Mac mini running OS X Lion 10.7.4. This Mac mini has my entire media library including a ton of DVDs that were ripped and transcoded to work on Apple TV. I have 3 of the very latest Apple TVs that stream content from the Home Sharing library of my Mac mini. Everything works great most of the time.
I am running to an issue with increasing frequency, where the Apple TVs cannot load the library from the Mac mini (it shows the spinning gear). The only solution I have found is to quit iTunes on the Mac mini and then restart it.
What I would like to do is have something on my iPhone that will allow me to stop and then restart iTunes on the Mac mini. I run Apache on this machine and I have written a little PHP script that will stop and then start iTunes using AppleScript and
osascript. It works fine from the Terminal, but not from the web server. I am sure it is a permissions problem, but I do not really want to run the web server under my user account.
Any suggestions? I can buy an app or script something using PHP or AppleScript. I do not want to use just an SSH or VNC client because I want my kids to do this easily as well.