I'm having major problems getting the Tunez Daemon to start playing from the webpage. How should I troubleshoot this?
- Ensure you can start the daemon as a normal user
- Try to start/stop the daemon from the web
First we recommend making sure that you can start the daemon as a local user. If you know this works skip to step 2. Otherwise, change into the Tunez directory and either run one of the following depending on what mode you are running the Tunez Daemon in:/usr/bin/php tunezd.php
If you get a message saying "Cannot connect to mySQL database" or something to that effect it means that you are using tunezd.pl and you forgot to include the database information in the file. Edit it and include your mySQL connectivity information.
If you get a message saying "Cannot find the location to tunez.inc.php" or something to that effect it means that you need to edit tunezd.php and provide the absolute path to your tunez.inc.php file.
If you are getting no output that's probably a good sign as the daemon is designed to redirect all output to /dev/null to avoid issues with debugging output interfering with the detach program used when you start/stop from the web. First check to make sure you're hearing sound. Double check to make sure your sound card volume is turned up high enough, etc. If you're using the shout or Icecast mode try connecting to the stream and see if things are fixed. If you really want to make sure everything is working ok look for lines containing:> /dev/null 2> /dev/null
Change them wherever they exist to something like this> /tmp/tunezlog 2> /tmp/tunezlog2
Then run the daemon for a few seconds and hit CTRL-C and then examine the files. When you are happy that everything is working well move onto step two (but don't forget to change the /tmp/tunezlog back to /dev/null otherwise your webserver may have problems overwriting these files and starting/stopping the daemon definitely will not work from the web!
If you're having problems starting and stopping the daemon from the web but it works fine as a general user the issue is one of three things.
Permissions: Perhaps the most common. Your /dev/mixer and /dev/dsp devices are not writeable by the webserver. Follow the directions in the INSTALL file to fix this
Detach not compiled: Another major problem is that you forgot to compile detach. Run "make" in the Detach-1.2 directory.
Paths to detach incorrect: If the first two suggestions don't fix the problem try outputting what is being executed in the admin_daemon.php script. To do this find the line with:exec($command);
Change it to:print $command;
Then ensure that the path is correct and even try running that exact same command as a normal user and see what happens. If this doesn't help at all contact us at the Tunez Help forum