total 200
drwxrwxr-x 23 parisbut www 782 19 Mar 12:25 .
drwxrwxr-x 5 root admin 170 18 Mar 19:43 ..
-rw-rw-rw- 1 parisbut admin 12292 19 Mar 12:25 .DS_Store
-rwxr-xr-x 1 parisbut parisbut 265 28 Feb 20:08 FastForward.pl
-rwxr-xr-x 1 parisbut parisbut 980 25 Feb 22:31 FastForward.scpt
-rwxr-xr-x 1 parisbut parisbut 263 28 Feb 20:08 MuteUnMute.pl
-rwxr-xr-x 1 parisbut parisbut 1018 25 Feb 22:41 MuteUnMute.scpt
-rwxr-xr-x 1 parisbut parisbut 265 28 Feb 20:08 PlayPause.pl
-rwxr-xr-x 1 parisbut parisbut 984 25 Feb 22:30 PlayPause.scpt
-rw-r--r-- 1 parisbut parisbut 1137 27 Feb 19:18 README
-rwxr-xr-x 1 parisbut parisbut 264 28 Feb 20:08 RandomTrack.pl
-rwxr-xr-x 1 parisbut parisbut 5794 27 Feb 20:37 RandomTrack.scpt
-rwxr-xr-x 1 parisbut parisbut 259 28 Feb 20:09 Rewind.pl
-rwxr-xr-x 1 parisbut parisbut 974 25 Feb 22:31 Rewind.scpt
-rwxr-xr-x 1 parisbut parisbut 263 28 Feb 20:09 VolumeDown.pl
-rwxr-xr-x 1 parisbut parisbut 1038 25 Feb 22:36 VolumeDown.scpt
-rwxr-xr-x 1 parisbut parisbut 261 28 Feb 20:09 VolumeUp.pl
-rwxr-xr-x 1 parisbut parisbut 1036 26 Feb 00:30 VolumeUp.scpt
-rwxr-xr-x 1 parisbut parisbut 217 27 Feb 19:19 hello.wml
-rwxr--r-- 1 parisbut parisbut 1027 27 Feb 19:17 iTunesRemoteControlDaemon.scr
-rwxr-xr-x 1 parisbut parisbut 159 26 Feb 01:29 index.pl
-rwxr--r-- 1 parisbut parisbut 909 27 Feb 19:19 killRemoteControlDaemon.scr
-rw-r--r-- 1 parisbut parisbut
625 27 Feb 20:36 menu
Local host works, file is promted to download in webrowser. I'm running it from /Library/WebServer/CGI-Executables/. When I use my IP I get the same defualt page. Thank you For Your Help
So to clarify, when you say "file is promted to download in webrowser", you are referring to the simple perl file I pasted in to my previous reply? i.e. you get a prompt to download the actual perl file?
What URL are you typing in exactly? Is it http://localhost/cgi-bin/yourPerlFile.pl ? (The cgi-bin part is important).
If you have modified /etc/httpd/httpd.conf recently, did you remember to stop and restart apache via your System Preferences/Sharing/Personal Web Sharing? If not, your changes weren't updated despite what it may appear. Stop and restart to be sure.
Yes I am prompted to download the actual perl file.
I'm accessing the files http://localhost(or IP):81/cgi-bin/yourPerlFile.pl
:81 because my ISP blocks 80, and I have edited the httpd.conf to use 81. Not using a router either.
I'm also using my phone, as well as Opera(WAP). The Page with the links for or to commands does show. When I press a command it doesn't work. ie. Play doesn't work
I have retarted apache over and over. Still nothing.
So when you type http://localhost:81/cgi-bin/hellothere.pl into your web browser (for the simple perl file I pasted in earlier that simply printed a line of text, you get a download option instead of getting a simple webpage? This is expected because the content type is specified to be "Content-type: text/vnd.wap.wml"--which your browser on your computer can't understand (but your phone or a WAP emulator can understand; see page one of the article). Try replacing that line with "Content-type: text/html\n\n" and your browser should then be able to display it. If this checks out, CGI is working.
So the first step thing to do is to use a wap emulator and get your index.pl file to display for you...but based on your comment that "The Page with the links for or to commands does show", this is already happening? (Otherwise, you wouldn't be getting that menu.) If this is the case, the page containing the menu is WAP content served with perl.
Once your server is configured to process the perl scripts and serve you wap content (which it appears to be), you can then start up the background daemon and try to get the iTunes stuff working. Given that the CGI is working, the only other thing that wouldn't be is your background daemon.
You are firing up the background daemon, and have verified that the file it expects to read ( /tmp/iTunesRemoteControl) does exist? If perl is rendering the menu for you, it should also be writing that file to the /tmp directory.
If I've misunderstood anything you've said, clear it up and let's go from there.
I am able to see the text in my regular web broswer when I chanhe the content type.
I am able to see the page with WAP.
How do I start the backrond daemon? I dropped file into terninmal and the scripts started working, but now it just stoped. I'm not sure what command I used if any to get it to start.
and tmp/itunesRemoteControl does exist, the file s their.
This might be a good time to review the usage header in the daemon script and walk through it once or twice to understand how it does its business. You just start it like any other script only you might find it convenient to end it with an ampersand so it doesn't lock your terminal and so you don't have to keep an extra window open.
If you type "ps -aux" in a terminal, you'll get a list of everything running, and the daemon should be there if it's running. This is the same technique that the kill script uses to find it and kill it whenever you want to shut it down or restart it. Take a look at the latter part of page 2 in the article and checkout the README file included with the scripts.
I think you should be up and running now. Thanks for sticking with it.
So what this assumes is that you're in the same directory as this script (and that you've set it to be executable with "chmod u+x"). Just like any other script, when you type in ./someScriptName, it will execute if it's executable. Placing the ampersand should return your prompt to you. At that point, if you type in "ps -aux | grep iTunesRemoteControlDaemon.scr", you should see it without having to filter through anything.
Ampersand is "&" --the thing that's in the usage line that sets the script to run in the background. It's a standard terminal thing.
Try skipping the ampersand for now. Just get the script to run. If you run the script and it keeps your prompt, it's running. Open up another terminal window and go about doing other things. When you're satisfied that things are running, you can use the ampersand and have one less window open.
What URL are you typing in exactly? Is it http://localhost/cgi-bin/yourPerlFile.pl ? (The cgi-bin part is important).
If you have modified /etc/httpd/httpd.conf recently, did you remember to stop and restart apache via your System Preferences/Sharing/Personal Web Sharing? If not, your changes weren't updated despite what it may appear. Stop and restart to be sure.
We're narrowing it down. Don't give up!
M.