Google Answers Logo
View Question
 
Q: Controlling iTunes server-side via COM through PHP ( No Answer,   2 Comments )
Question  
Subject: Controlling iTunes server-side via COM through PHP
Category: Computers > Programming
Asked by: bluedude-ga
List Price: $20.00
Posted: 02 Jun 2005 14:28 PDT
Expires: 02 Jul 2005 14:28 PDT
Question ID: 528671
**THE QUESTION: SHORT VERSION**
I want to be able to control iTunes on my local machine through the
internet, ie a WWW site. I want to be able to go to a website, click
"Next Track" and have the song playing on my computer change.

**THE DETAILS**
I intend to control this via a PHP script using iTunes SDK and COM
objects. I am running Apache 2 on my Windows XP box with PHP 5
installed. iTunes is available to any windows program via COM
interface. See http://developer.apple.com/sdk/itunescomsdk.html to
download the SDK.

In PHP, you can create a new COM object via $iTunesApp = new
COM("iTunes.Application"); and then have at that COM object. I have
the relevant methods I want to call and know how to use those. In
fact, I've written a C#, Java, and PHP script which do this fine. When
I run the PHP script locally on my machine through 'php.exe
iTunesControl.php' it works great, my iTunes will change tracks (which
is what I set the PHP script up to do for now). However, when I put
this in my apache htdocs directory and try to access the same thing
over the web, it hangs. Other PHP scripts work fine, so my PHP
installation is correct, and it works locally, so my COM access is ok.
I believe that the problem I'm having is related to permissions in XP
and/or apache.

I've tried changing how apache runs as a service (from system account
to dedicated user account), how DCOM handles access requests for the
iTunes app (via dcomcnfg.exe), and made sure my php.ini file was
correct. I've scoured as many message boards as I can think of (mostly
all of the php.net docs and boards) to no avail.

**THE QUESTION, AGAIN**
How do I set up Apache, PHP, or my COM setup so that I will be able to
control iTunes through my website? What permissions do I need to
change? Is there a better way?

Please post any clarification requests if you have them, and if you
feel that this problem is worth more, please ask and I may raise it
within reasonable limits.

Thanks in advance for any help!

Clarification of Question by bluedude-ga on 02 Jun 2005 14:29 PDT
Quick note: PHP is installed as a module in apache for me.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Controlling iTunes server-side via COM through PHP
From: crapcomics-ga on 05 Jan 2006 10:16 PST
 
I had a similar problem and found the discussion on this page
(http://www.mikenaberezny.com/archives/16) helped me reach a solution.
I solved my problem by running dcomcnfg.exe ->  Component Services ->
Computers -> My Computer -> DCOM Config -> iTunes. In the "Identity"
tab I set the account running the application to be "The Interactive
User" and additionally in the "Security" tab I set the all permissions
to "Customize" and then added the user "INTERACTIVE" with full
permissions for all three categories - "Launch and Activation
Permissions", "Access Permissions" and "Configuration Permissions".

I'm not sure if all these steps were necessary. I then closed iTunes,
restarted Apache and it now works for me :)
Subject: Re: Controlling iTunes server-side via COM through PHP
From: danno888-ga on 01 Feb 2006 16:05 PST
 
There is a great article on engadget about this.I use it and it works
great,it shows all your tracks and you can pause, and skip tracks.The
link is http://household.engadget.com/2005/12/13/how-to-control-itunes-from-any-web-browser/
The file download does not work,also the php script they have does not
show tracks.I googled for the new php but could not find it, if you
want it contact me at dgriffin600@earthlink.net and i will email it to
you. Its a realy light file.Just follow the directions on engadget and
you will be fine, i highly reccoment using brs webweaver its great for
anything.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy