Mpd frustration

I have been using arch for over a year, but recently I reinstalled with x86_64 rather then i686 that I was using before. Now Im trying to get mpd up and running again with sonata but the wiki seems to be missing some important steps or something.
Im following the standard "arch way" instructions from the wiki which use the user mpd. The problem seems to be that my music is kept in my home directory /home/tj/Music/.  I dont see why the instructions for doing this wouldn't be in the wiki considering the wiki examples show the same scenario. I did find this but that method just doesn't seem very secure to me.
I run sudo mpd --create-db and get this
[tj@arch ~]$ sudo mpd --create-db
failed to stat music directory "/home/tj/Music": Permission denied
output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
output: Successfully detected a alsa audio device
[tj@arch ~]$
I have tried everything I can think of to get this working. I have changed permissions on /home/tj/Music to allow group users read/write/execute permission and still nothing. I have changed permissions to allow everyone read/write/execute but still nothing. I have tried symlinking /home/tj/Music to /var/lib/mpd/Music/ with the full permission and changing my mpd.conf accordingly, but still nothing. I have tried making a new group called music, adding user mpd to it, and giving that group full permission but still nothing.
The only thing I can think of that could be causing this is that my /home/tj/ directory it self doesn't allow read access to anybody except user tj, but I really don't want to change that for security reasons. To get around this I tried just giving the permissions to only /home/tj/Music and symlinking it to /var/lib/mpd so I wouldn't need to navigate through /home/tj/ but it doesn't work that way either. I really would like to have only /home/tj/Music to have permissions and nothing else.
Short of giving up my home directory permissions, or changing mpd's user to tj, how can I make this work?
/etc/mpd.conf
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
music_directory "/home/tj/Music"
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
playlist_directory "/var/lib/mpd/playlists"
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
db_file "/var/lib/mpd/mpd.db"
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
#log_file "/var/log/mpd/mpd.log"
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
pid_file "/var/run/mpd/mpd.pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
state_file "/var/lib/mpd/mpdstate"
# General music daemon options ################################################
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
user "mpd"
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon.
# For network
#bind_to_address "any"
# And for Unix Socket
#bind_to_address "~/.mpd/socket"
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#port "6600"
# This setting controls the type of information which is logged. Available
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
# argument is recommended for troubleshooting, though can quickly stretch
# available resources on limited hardware storage.
#log_level "default"
# If you have a problem with your MP3s ending abruptly it is recommended that
# you set this argument to "no" to attempt to fix the problem. If this solves
# the problem, it is highly recommended to fix the MP3 files with vbrfix
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point gapless MP3 playback can be enabled.
#gapless_mp3_playback "yes"
# This setting enables MPD to create playlists in a format usable by other
# music players.
#save_absolute_paths_in_playlists "no"
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. Optionally, 'comment' can be added to this
# list.
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
# Symbolic link behavior ######################################################
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#follow_outside_symlinks "yes"
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#follow_inside_symlinks "yes"
# Zeroconf / Avahi Service Discovery ##########################################
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#zeroconf_enabled "yes"
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network.
#zeroconf_name "Music Player"
# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password "password@read,add,control,admin"
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions "read,add,control,admin"
# Input #######################################################################
input {
plugin "curl"
# proxy "proxy.isp.com:8080"
# proxy_user "user"
# proxy_password "password"
# Audio Output ################################################################
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs> for examples of
# other audio outputs.
# An example of an ALSA output:
#audio_output {
# type "alsa"
# name "My ALSA Device"
## device "hw:0,0" # optional
## format "44100:16:2" # optional
## mixer_device "default" # optional
## mixer_control "PCM" # optional
## mixer_index "0" # optional
# An example of an OSS output:
#audio_output {
# type "oss"
# name "My OSS Device"
## device "/dev/dsp" # optional
## format "44100:16:2" # optional
## mixer_device "/dev/mixer" # optional
## mixer_control "PCM" # optional
# An example of a shout output (for streaming to Icecast):
#audio_output {
# type "shout"
# encoding "ogg" # optional
# name "My Shout Stream"
# host "localhost"
# port "8000"
# mount "/mpd.ogg"
# password "hackme"
# quality "5.0"
# bitrate "128"
# format "44100:16:1"
## protocol "icecast2" # optional
## user "source" # optional
## description "My Stream Description" # optional
## genre "jazz" # optional
## public "no" # optional
## timeout "2" # optional
# An example of a httpd output (built-in HTTP streaming server):
#audio_output {
# type "httpd"
# name "My HTTP Stream"
# encoder "vorbis" # optional, vorbis or lame
# port "8000"
## quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
# format "44100:16:1"
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#audio_output {
# type "pulse"
# name "My Pulse Output"
## server "remote_server" # optional
## sink "remote_server_sink" # optional
## Example "pipe" output:
#audio_output {
# type "pipe"
# name "my pipe"
# command "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
# command "nc example.org 8765"
# format "44100:16:2"
## An example of a null output (for no audio output):
#audio_output {
# type "null"
# name "My Null Output"
# This setting will change all decoded audio to be converted to the specified
# format before being passed to the audio outputs. By default, this setting is
# disabled.
#audio_output_format "44100:16:2"
# If MPD has been compiled with libsamplerate support, this setting specifies
# the sample rate converter to use. Possible values can be found in the
# mpd.conf man page or the libsamplerate documentation. By default, this is
# setting is disabled.
#samplerate_converter "Fastest Sinc Interpolator"
# Volume control mixer ########################################################
# These are the global volume control settings. By default, this setting will
# be detected to the available audio output device, with preference going to
# hardware mixing. Hardware and software mixers for individual audio_output
# sections cannot yet be mixed.
# An example for controlling an ALSA, OSS or Pulseaudio mixer; If this
# setting is used other sound applications will be affected by the volume
# being controlled by MPD.
#mixer_type "hardware"
# An example for controlling all mixers through software. This will control
# all controls, even if the mixer is not supported by the device and will not
# affect any other sound producing applications.
#mixer_type "software"
# This example will not allow MPD to touch the mixer at all and will disable
# all volume controls.
#mixer_type "disabled"
# Normalization automatic volume adjustments ##################################
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "album" or "track". See <http://www.replaygain.org> for more
# details. This setting is disabled by default.
#replaygain "album"
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#replaygain_preamp "0"
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#volume_normalization "no"
# MPD Internal Buffering ######################################################
# This setting adjusts the size of internal decoded audio buffering. Changing
# this may have undesired effects. Don't change this if you don't know what you
# are doing.
#audio_buffer_size "2048"
# This setting controls the percentage of the buffer which is filled before
# beginning to play. Increasing this reduces the chance of audio file skipping,
# at the cost of increased time prior to audio playback.
#buffer_before_play "10%"
# Resource Limitations ########################################################
# These settings are various limitations to prevent MPD from using too many
# resources. Generally, these settings should be minimized to prevent security
# risks, depending on the operating resources.
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# Character Encoding ##########################################################
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting. After modification of this setting mpd
# --create-db must be run to change the database.
#filesystem_charset "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.
#id3v1_encoding "ISO-8859-1"
Also before anybody asks /var/log/mpd.log and /var/log/mpd.error are both empty, and yes I followed the wiki exactly and touched all the necessary files.
Last edited by tjwoosta (2009-12-09 07:29:47)

Why do ppl only change 1 line in the config without bothering with the rest and wonder why it does not work. You havent even defined an audio output and you surely know that you need audio to hear music, dont you?
No, actually I never defined an audio output on perpose because it automatically detects it. It says that in the wiki. See my first code block?
"output: Successfully detected a alsa audio device"
anyway.. your problem is none at all. Since you didnt bother to change the default user in mpd.conf (default is "mpd"), it cannot access your music, which is in /home/tj. Only user "tj" has access to that folder and you dont want it to be any different for security reasons. So the easiest way to solve this is to change the mpd_user to "tj"
Did you even read my post before you started giving attitude? I followed the wiki pages recommendations and used the user mpd for a reason.
"Keeps the setup in /var and uses "mpd" as default user instead of cluttering up ~/. This is the way the arch package is installed. "
I want user mpd to have access to my Music directory, just not its parent directories. Is this not possible?
My guess is you are the only user on this computer. If this is the case i advise you to create a ~/.mpd folder and inside of this a "playlists" folder. Then change the paths in mpd.conf accordingly. Restart mpd and it should work.
Again I would like to avoid this if possible. If its not, then why is everything recommending the user mpd and /var/lib/mpd, when 90% of people are going to have their music in their regular home directory? The wiki page seems pretty misleading if you ask me.
Another thing: there are useful options in the config, read it! E.g. replaygain and gapless playback are some things nearly everyone probably wants.
Yes, believe it or no I did read it, and I have successfully setup mpd before. I also read the entire wiki page. I was planning to get things working in the first place before I go playing around with optional features.
And one last bit: The --create-db option is deprecated, dont use it! use your client to update your library
Have not heard that before, its never mentioned in the wiki, or in any of the various forum threads I read before posting. Either way --create-db should still work shouldn't it? Sonata's library update doesn't work either.
Change group for your musicfolder to mpd.
That was the first thing I tried, but it still doesn't work and returns the same permission error.
Try "mount --bind".
It worked!  Thank you kind sir

Similar Messages

  • [SOLVED]Serious frustrations with MPD-Pulse and ncmpcpp

    There are a couple of problems I'm having.  First and foremost, I can't access any sort of flash video without mpd stopping and not working until a full system reboot, I've tried "sudo mpd --kill && sudo mpd --no-create-db" as well as "sudo /etc/rc.d/mpd restart" and they don't work.  I've noticed several people with this problem while using alsa, I've tried normal mpd and tried some of the suggestions that I found for mpd.conf but to no avail and got the added bonus of play on startup which annoys me (mpd-pulse for whatever reason doesn't do that) so I was wondering if there exist any sort of work around for mpd-pulse or pulse in general (I'll take whatever).
    Moving onto the more minor problem with ncmpcpp, there was an update today and upon installing I've noticed a serious decrease in speed, particularly when scrolling through the library and stumbling upon a certain artist that has a lot of albums/songs, but also when first playing a song after a system boot ncmpcpp will wait ~6 seconds before playing any sound (while the progress bar for the song is moving forward).  The first issue is more important as I have several discographies and going from one end of my library to another is rather difficult at present, but the latter is still really annoying.
    I'm mainly trying to see if any one has a suggestion for my mpd-pulse issues with flash, and I'm curious if the ncmpcpp things are something everyone is experiencing or if it's just me.
    Thank you in advance,
    --Wes
    Last edited by Wesman26 (2010-06-19 03:52:55)

    About flash:
    If I'm correct in saying that all audio is out after using flash in a browser, and nothing works until the browser is closed, then the problem is indeed OSS. Here's what you do: before starting any audio applications, (as root)
    # rmmod snd-pcm-oss
    # rmmod snd-mixer-oss
    # rmmod snd-seq-oss
    Add these into your /etc/rc.conf module list, with a ! before them (this blacklists them):
    MODULES=( <...other modules...> !snd_pcm_oss !snd_seq_oss)
    I found this thread because of ncmpcpp is gone really slow for me too. Gonna have to try this unix socket stuff. I don't really understand it if I'm honest B-)

  • PHP MPD Class

    Most mpd.class.php's are old and produce a lot of errors which caused me much frustration in this thread.
    I was wrapping my head around why phpmpreloaded worked and the others never and it's because it uses an updated mpd.class.php. To save others the frustration and hassle I figured I'd post the new class here.
    Enjoy.
    <?php
    * Sven Ginka 03/2010
    * Version mpd.class.php-1.3
    * - take over from Hendrik Stoetter
    * - removed "split()" as this function is marked depracted
    * - added property "xfade" (used by IPodMp, phpMp+)
    * - added property "bitrate" (used by phpMp+)
    * - added define "MPD_SEARCH_FILENAME"
    * - included sorting algorithm "msort"
    * - added function validateFile() for guessing a title if no ID3 data is given
    * Hendrik Stoetter 03/2008
    * - this a lightly modified version of mod.class Version 1.2.
    * - fixed some bugs and added some new functions
    * - Changes:
    * GetDir($url) -> GetDir(url,$sort)
    * var $stats
    * Benjamin Carlisle 05/05/2004
    * mpd.class.php - PHP Object Interface to the MPD Music Player Daemon
    * Version 1.2, Released 05/05/2004
    * Copyright (C) 2003-2004 Benjamin Carlisle ([email protected])
    * http://mpd.24oz.com/ | http://www.musicpd.org/
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    // Create common command definitions for MPD to use
    define("MPD_CMD_STATUS", "status");
    define("MPD_CMD_STATISTICS", "stats");
    define("MPD_CMD_VOLUME", "volume");
    define("MPD_CMD_SETVOL", "setvol");
    define("MPD_CMD_PLAY", "play");
    define("MPD_CMD_STOP", "stop");
    define("MPD_CMD_PAUSE", "pause");
    define("MPD_CMD_NEXT", "next");
    define("MPD_CMD_PREV", "previous");
    define("MPD_CMD_PLLIST", "playlistinfo");
    define("MPD_CMD_PLADD", "add");
    define("MPD_CMD_PLREMOVE", "delete");
    define("MPD_CMD_PLCLEAR", "clear");
    define("MPD_CMD_PLSHUFFLE", "shuffle");
    define("MPD_CMD_PLLOAD", "load");
    define("MPD_CMD_PLSAVE", "save");
    define("MPD_CMD_KILL", "kill");
    define("MPD_CMD_REFRESH", "update");
    define("MPD_CMD_REPEAT", "repeat");
    define("MPD_CMD_LSDIR", "lsinfo");
    define("MPD_CMD_SEARCH", "search");
    define("MPD_CMD_START_BULK", "command_list_begin");
    define("MPD_CMD_END_BULK", "command_list_end");
    define("MPD_CMD_FIND", "find");
    define("MPD_CMD_RANDOM", "random");
    define("MPD_CMD_SEEK", "seek");
    define("MPD_CMD_PLSWAPTRACK", "swap");
    define("MPD_CMD_PLMOVETRACK", "move");
    define("MPD_CMD_PASSWORD", "password");
    define("MPD_CMD_TABLE", "list");
    define("MPD_CMD_PLMOVE", "move" );
    // Predefined MPD Response messages
    define("MPD_RESPONSE_ERR", "ACK");
    define("MPD_RESPONSE_OK", "OK");
    // MPD State Constants
    define("MPD_STATE_PLAYING", "play");
    define("MPD_STATE_STOPPED", "stop");
    define("MPD_STATE_PAUSED", "pause");
    // MPD Searching Constants
    define("MPD_SEARCH_ARTIST", "artist");
    define("MPD_SEARCH_TITLE", "title");
    define("MPD_SEARCH_ALBUM", "album");
    define("MPD_SEARCH_ANY", "any");
    define("MPD_SEARCH_FILENAME","filename");
    // MPD Cache Tables
    define("MPD_TBL_ARTIST","artist");
    define("MPD_TBL_ALBUM","album");
    $mpd_debug = 0;
    function addLog($text){
    global $mpd_debug;
    $style="background-color:lightgrey;border:thin solid grey;margin:5px;padding:5px";
    if ($mpd_debug) echo '<div style="'.$style.'">log:>'.$text.'</div>';
    function addErr($err){
    global $mpd_debug;
    if ($mpd_debug) echo 'error:>'.$err.'<br>';
    class mpd {
    // TCP/Connection variables
    var $host;
    var $port;
    var $password;
    var $mpd_sock = NULL;
    var $connected = FALSE;
    // MPD Status variables
    var $mpd_version = "(unknown)";
    var $state;
    var $current_track_position;
    var $current_track_length;
    var $current_track_id;
    var $volume;
    var $repeat;
    var $random;
    var $uptime;
    var $playtime;
    var $db_last_refreshed;
    var $num_songs_played;
    var $playlist_count;
    var $xfade;
    var $bitrate;
    var $num_artists;
    var $num_albums;
    var $num_songs;
    var $playlist = array();
    var $stats;
    // Misc Other Vars
    var $mpd_class_version = "1.2";
    var $debugging = FALSE; // Set to TRUE to turn extended debugging on.
    var $errStr = ""; // Used for maintaining information about the last error message
    var $command_queue; // The list of commands for bulk command sending
    // =================== BEGIN OBJECT METHODS ================
    /* mpd() : Constructor
    * Builds the MPD object, connects to the server, and refreshes all local object properties.
    function mpd($srv,$port,$pwd = NULL, $debug= FALSE ) {
    $this->host = $srv;
    $this->port = $port;
    $this->password = $pwd;
    $this->debugging = $debug;
    global $mpd_debug;
    $mpd_debug = $debug;
    $resp = $this->Connect();
    if ( is_null($resp) ) {
    addErr( "Could not connect" );
    return;
    } else {
    addLog( "connected");
    list ( $this->mpd_version ) = sscanf($resp, MPD_RESPONSE_OK . " MPD %s\n");
    if ( ! is_null($pwd) ) {
    if ( is_null($this->SendCommand(MPD_CMD_PASSWORD,$pwd)) ) {
    $this->connected = FALSE;
    addErr("bad password");
    return; // bad password or command
    if ( is_null($this->RefreshInfo()) ) { // no read access -- might as well be disconnected!
    $this->connected = FALSE;
    addErr("Password supplied does not have read access");
    return;
    } else {
    if ( is_null($this->RefreshInfo()) ) { // no read access -- might as well be disconnected!
    $this->connected = FALSE;
    addErr("Password required to access server");
    return;
    /* Connect()
    * Connects to the MPD server.
    * NOTE: This is called automatically upon object instantiation; you should not need to call this directly.
    function Connect() {
    addLog( "mpd->Connect() / host: ".$this->host.", port: ".$this->port."\n" );
    $this->mpd_sock = fsockopen($this->host,$this->port,$errNo,$errStr,10);
    if (!$this->mpd_sock) {
    addErr("Socket Error: $errStr ($errNo)");
    return NULL;
    } else {
    $counter=0;
    while(!feof($this->mpd_sock)) {
    $counter++;
    if ($counter > 10){
    addErr("no file end");
    return NULL;
    $response = fgets($this->mpd_sock,1024);
    addLog( $response );
    if (strncmp(MPD_RESPONSE_OK,$response,strlen(MPD_RESPONSE_OK)) == 0) {
    $this->connected = TRUE;
    return $response;
    if (strncmp(MPD_RESPONSE_ERR,$response,strlen(MPD_RESPONSE_ERR)) == 0) {
    // close socket
    fclose($this->mpd_sock);
    addErr("Server responded with: $response");
    return NULL;
    // close socket
    fclose($this->mpd_sock);
    // Generic response
    addErr("Connection not available");
    return NULL;
    /* SendCommand()
    * Sends a generic command to the MPD server. Several command constants are pre-defined for
    * use (see MPD_CMD_* constant definitions above).
    function SendCommand($cmdStr,$arg1 = "",$arg2 = "") {
    addLog("mpd->SendCommand() / cmd: ".$cmdStr.", args: ".$arg1." ".$arg2 );
    // Clear out the error String
    $this->errStr = NULL;
    $respStr = "";
    if ( ! $this->connected ) {
    addErr( "mpd->SendCommand() / Error: Not connected");
    } else {
    // Check the command compatibility:
    if ( ! $this->_checkCompatibility($cmdStr) ) {
    return NULL;
    if (strlen($arg1) > 0) $cmdStr .= " \"$arg1\"";
    if (strlen($arg2) > 0) $cmdStr .= " \"$arg2\"";
    fputs($this->mpd_sock,"$cmdStr\n");
    while(!feof($this->mpd_sock)) {
    $response = fgets($this->mpd_sock,1024);
    //addLog($response);
    // An OK signals the end of transmission -- we'll ignore it
    if (strncmp(MPD_RESPONSE_OK,$response,strlen(MPD_RESPONSE_OK)) == 0) {
    break;
    // An ERR signals the end of transmission with an error! Let's grab the single-line message.
    if (strncmp(MPD_RESPONSE_ERR,$response,strlen(MPD_RESPONSE_ERR)) == 0) {
    list ( $junk, $errTmp ) = strtok(MPD_RESPONSE_ERR . " ",$response );
    addErr( strtok($errTmp,"\n") );
    return NULL;
    // Build the response string
    $respStr .= $response;
    addLog("mpd->SendCommand() / response: '".$respStr."'\n");
    return $respStr;
    /* QueueCommand()
    * Queues a generic command for later sending to the MPD server. The CommandQueue can hold
    * as many commands as needed, and are sent all at once, in the order they are queued, using
    * the SendCommandQueue() method. The syntax for queueing commands is identical to SendCommand().
    function QueueCommand($cmdStr,$arg1 = "",$arg2 = "") {
    if ( $this->debugging ) echo "mpd->QueueCommand() / cmd: ".$cmdStr.", args: ".$arg1." ".$arg2."\n";
    if ( ! $this->connected ) {
    echo "mpd->QueueCommand() / Error: Not connected\n";
    return NULL;
    } else {
    if ( strlen($this->command_queue) == 0 ) {
    $this->command_queue = MPD_CMD_START_BULK . "\n";
    if (strlen($arg1) > 0) $cmdStr .= " \"$arg1\"";
    if (strlen($arg2) > 0) $cmdStr .= " \"$arg2\"";
    $this->command_queue .= $cmdStr ."\n";
    if ( $this->debugging ) echo "mpd->QueueCommand() / return\n";
    return TRUE;
    /* SendCommandQueue()
    * Sends all commands in the Command Queue to the MPD server. See also QueueCommand().
    function SendCommandQueue() {
    if ( $this->debugging ) echo "mpd->SendCommandQueue()\n";
    if ( ! $this->connected ) {
    echo "mpd->SendCommandQueue() / Error: Not connected\n";
    return NULL;
    } else {
    $this->command_queue .= MPD_CMD_END_BULK . "\n";
    if ( is_null($respStr = $this->SendCommand($this->command_queue)) ) {
    return NULL;
    } else {
    $this->command_queue = NULL;
    if ( $this->debugging ) echo "mpd->SendCommandQueue() / response: '".$respStr."'\n";
    return $respStr;
    /* AdjustVolume()
    * Adjusts the mixer volume on the MPD by <modifier>, which can be a positive (volume increase),
    * or negative (volume decrease) value.
    function AdjustVolume($modifier) {
    if ( $this->debugging ) echo "mpd->AdjustVolume()\n";
    if ( ! is_numeric($modifier) ) {
    $this->errStr = "AdjustVolume() : argument 1 must be a numeric value";
    return NULL;
    $this->RefreshInfo();
    $newVol = $this->volume + $modifier;
    $ret = $this->SetVolume($newVol);
    if ( $this->debugging ) echo "mpd->AdjustVolume() / return\n";
    return $ret;
    /* SetVolume()
    * Sets the mixer volume to <newVol>, which should be between 1 - 100.
    function SetVolume($newVol) {
    if ( $this->debugging ) echo "mpd->SetVolume()\n";
    if ( ! is_numeric($newVol) ) {
    $this->errStr = "SetVolume() : argument 1 must be a numeric value";
    return NULL;
    // Forcibly prevent out of range errors
    if ( $newVol < 0 ) $newVol = 0;
    if ( $newVol > 100 ) $newVol = 100;
    // If we're not compatible with SETVOL, we'll try adjusting using VOLUME
    if ( $this->_checkCompatibility(MPD_CMD_SETVOL) ) {
    if ( ! is_null($ret = $this->SendCommand(MPD_CMD_SETVOL,$newVol))) $this->volume = $newVol;
    } else {
    $this->RefreshInfo(); // Get the latest volume
    if ( is_null($this->volume) ) {
    return NULL;
    } else {
    $modifier = ( $newVol - $this->volume );
    if ( ! is_null($ret = $this->SendCommand(MPD_CMD_VOLUME,$modifier))) $this->volume = $newVol;
    if ( $this->debugging ) echo "mpd->SetVolume() / return\n";
    return $ret;
    /* GetDir()
    * Retrieves a database directory listing of the <dir> directory and places the results into
    * a multidimensional array. If no directory is specified, the directory listing is at the
    * base of the MPD music path.
    function GetDir($dir = "",$sort = "") {
    addLog( "mpd->GetDir()" );
    $resp = $this->SendCommand(MPD_CMD_LSDIR,$dir);
    $listArray = $this->_parseFileListResponse($resp);
    if ($listArray==null){
    return null;
    // we have 3 differnt items: directory, playlist and file
    // we have to sort them individually and separate
    // playlist and directory by name
    // file by $sort
    // 1st: subarrays
    $array_directory = $listArray['directories'];
    $array_playlist = $listArray['playlists'];
    $array_file = $listArray['files'];
    // 2nd: sort them
    natcasesort($array_directory);
    natcasesort($array_playlist);
    usort($array_file,"msort");
    // 3rd: rebuild
    $array_return= array(
    "directories"=> $array_directory,
    "playlists"=> $array_playlist,
    "files"=> $array_file
    foreach ($array_directory as $value) {
    $array_return[]["directory"] = $value;
    foreach ($array_playlist as $value) {
    $array_return[]["playlist"] = $value;
    $array_return = array_merge($array_return,$array_file);
    addLog( "mpd->GetDir() / return ".print_r($array_return,true));
    return $array_return;
    /* GetDirTest() (Unoffical add) -- Returns readable dir contents
    * Retrieves a database directory listing of the <dir> directory and places the results into
    * a multidimensional array. If no directory is specified, the directory listing is at the
    * base of the MPD music path.
    function GetDirTest($dir = "") {
    if ( $this->debugging ) echo "mpd->GetDir()\n";
    $resp = $this->SendCommand(MPD_CMD_LSDIR,$dir);
    #$dirlist = $this->_parseFileListResponse($resp);
    $dirlist = $this->_parseFileListResponseHumanReadable($resp);
    if ( $this->debugging ) echo "mpd->GetDir() / return ".print_r($dirlist)."\n";
    return $dirlist;
    /* PLAdd()
    * Adds each track listed in a single-dimensional <trackArray>, which contains filenames
    * of tracks to add, to the end of the playlist. This is used to add many, many tracks to
    * the playlist in one swoop.
    function PLAddBulk($trackArray) {
    if ( $this->debugging ) echo "mpd->PLAddBulk()\n";
    $num_files = count($trackArray);
    for ( $i = 0; $i < $num_files; $i++ ) {
    $this->QueueCommand(MPD_CMD_PLADD,$trackArray[$i]);
    $resp = $this->SendCommandQueue();
    $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLAddBulk() / return\n";
    return $resp;
    /* PLAdd()
    * Adds the file <file> to the end of the playlist. <file> must be a track in the MPD database.
    function PLAdd($fileName) {
    if ( $this->debugging ) echo "mpd->PLAdd()\n";
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLADD,$fileName))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLAdd() / return\n";
    return $resp;
    /* PLMoveTrack()
    * Moves track number <origPos> to position <newPos> in the playlist. This is used to reorder
    * the songs in the playlist.
    function PLMoveTrack($origPos, $newPos) {
    if ( $this->debugging ) echo "mpd->PLMoveTrack()\n";
    if ( ! is_numeric($origPos) ) {
    $this->errStr = "PLMoveTrack(): argument 1 must be numeric";
    return NULL;
    if ( $origPos < 0 or $origPos > $this->playlist_count ) {
    $this->errStr = "PLMoveTrack(): argument 1 out of range";
    return NULL;
    if ( $newPos < 0 ) $newPos = 0;
    if ( $newPos > $this->playlist_count ) $newPos = $this->playlist_count;
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLMOVETRACK,$origPos,$newPos))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLMoveTrack() / return\n";
    return $resp;
    /* PLShuffle()
    * Randomly reorders the songs in the playlist.
    function PLShuffle() {
    if ( $this->debugging ) echo "mpd->PLShuffle()\n";
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLSHUFFLE))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLShuffle() / return\n";
    return $resp;
    /* PLLoad()
    * Retrieves the playlist from <file>.m3u and loads it into the current playlist.
    function PLLoad($file) {
    if ( $this->debugging ) echo "mpd->PLLoad()\n";
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLLOAD,$file))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLLoad() / return\n";
    return $resp;
    /* PLSave()
    * Saves the playlist to <file>.m3u for later retrieval. The file is saved in the MPD playlist
    * directory.
    function PLSave($file) {
    if ( $this->debugging ) echo "mpd->PLSave()\n";
    $resp = $this->SendCommand(MPD_CMD_PLSAVE,$file);
    if ( $this->debugging ) echo "mpd->PLSave() / return\n";
    return $resp;
    /* PLClear()
    * Empties the playlist.
    function PLClear() {
    if ( $this->debugging ) echo "mpd->PLClear()\n";
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLCLEAR))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLClear() / return\n";
    return $resp;
    /* PLRemove()
    * Removes track <id> from the playlist.
    function PLRemove($id) {
    if ( $this->debugging ) echo "mpd->PLRemove()\n";
    if ( ! is_numeric($id) ) {
    $this->errStr = "PLRemove() : argument 1 must be a numeric value";
    return NULL;
    if ( ! is_null($resp = $this->SendCommand(MPD_CMD_PLREMOVE,$id))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->PLRemove() / return\n";
    return $resp;
    /* SetRepeat()
    * Enables 'loop' mode -- tells MPD continually loop the playlist. The <repVal> parameter
    * is either 1 (on) or 0 (off).
    function SetRepeat($repVal) {
    if ( $this->debugging ) echo "mpd->SetRepeat()\n";
    $rpt = $this->SendCommand(MPD_CMD_REPEAT,$repVal);
    $this->repeat = $repVal;
    if ( $this->debugging ) echo "mpd->SetRepeat() / return\n";
    return $rpt;
    /* SetRandom()
    * Enables 'randomize' mode -- tells MPD to play songs in the playlist in random order. The
    * <rndVal> parameter is either 1 (on) or 0 (off).
    function SetRandom($rndVal) {
    if ( $this->debugging ) echo "mpd->SetRandom()\n";
    $resp = $this->SendCommand(MPD_CMD_RANDOM,$rndVal);
    $this->random = $rndVal;
    if ( $this->debugging ) echo "mpd->SetRandom() / return\n";
    return $resp;
    /* Shutdown()
    * Shuts down the MPD server (aka sends the KILL command). This closes the current connection,
    * and prevents future communication with the server.
    function Shutdown() {
    if ( $this->debugging ) echo "mpd->Shutdown()\n";
    $resp = $this->SendCommand(MPD_CMD_SHUTDOWN);
    $this->connected = FALSE;
    unset($this->mpd_version);
    unset($this->errStr);
    unset($this->mpd_sock);
    if ( $this->debugging ) echo "mpd->Shutdown() / return\n";
    return $resp;
    /* DBRefresh()
    * Tells MPD to rescan the music directory for new tracks, and to refresh the Database. Tracks
    * cannot be played unless they are in the MPD database.
    function DBRefresh() {
    if ( $this->debugging ) echo "mpd->DBRefresh()\n";
    $resp = $this->SendCommand(MPD_CMD_REFRESH);
    // Update local variables
    $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->DBRefresh() / return\n";
    return $resp;
    /* Play()
    * Begins playing the songs in the MPD playlist.
    function Play() {
    if ( $this->debugging ) echo "mpd->Play()\n";
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PLAY) )) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->Play() / return\n";
    return $rpt;
    /* Stop()
    * Stops playing the MPD.
    function Stop() {
    if ( $this->debugging ) echo "mpd->Stop()\n";
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_STOP) )) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->Stop() / return\n";
    return $rpt;
    /* Pause()
    * Toggles pausing on the MPD. Calling it once will pause the player, calling it again
    * will unpause.
    function Pause() {
    if ( $this->debugging ) echo "mpd->Pause()\n";
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PAUSE) )) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->Pause() / return\n";
    return $rpt;
    /* SeekTo()
    * Skips directly to the <idx> song in the MPD playlist.
    function SkipTo($idx) {
    if ( $this->debugging ) echo "mpd->SkipTo()\n";
    if ( ! is_numeric($idx) ) {
    $this->errStr = "SkipTo() : argument 1 must be a numeric value";
    return NULL;
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PLAY,$idx))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->SkipTo() / return\n";
    return $idx;
    /* SeekTo()
    * Skips directly to a given position within a track in the MPD playlist. The <pos> argument,
    * given in seconds, is the track position to locate. The <track> argument, if supplied is
    * the track number in the playlist. If <track> is not specified, the current track is assumed.
    function SeekTo($pos, $track = -1) {
    if ( $this->debugging ) echo "mpd->SeekTo()\n";
    if ( ! is_numeric($pos) ) {
    $this->errStr = "SeekTo() : argument 1 must be a numeric value";
    return NULL;
    if ( ! is_numeric($track) ) {
    $this->errStr = "SeekTo() : argument 2 must be a numeric value";
    return NULL;
    if ( $track == -1 ) {
    $track = $this->current_track_id;
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_SEEK,$track,$pos))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->SeekTo() / return\n";
    return $pos;
    /* Next()
    * Skips to the next song in the MPD playlist. If not playing, returns an error.
    function Next() {
    if ( $this->debugging ) echo "mpd->Next()\n";
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_NEXT))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->Next() / return\n";
    return $rpt;
    /* Previous()
    * Skips to the previous song in the MPD playlist. If not playing, returns an error.
    function Previous() {
    if ( $this->debugging ) echo "mpd->Previous()\n";
    if ( ! is_null($rpt = $this->SendCommand(MPD_CMD_PREV))) $this->RefreshInfo();
    if ( $this->debugging ) echo "mpd->Previous() / return\n";
    return $rpt;
    /* Search()
    * Searches the MPD database. The search <type> should be one of the following:
    * MPD_SEARCH_ARTIST, MPD_SEARCH_TITLE, MPD_SEARCH_ALBUM
    * The search <string> is a case-insensitive locator string. Anything that contains
    * <string> will be returned in the results.
    function Search($type,$string) {
    addLog("mpd->Search()");
    if ( $type != MPD_SEARCH_ARTIST and
    $type != MPD_SEARCH_ALBUM and
    $type != MPD_SEARCH_ANY and
    $type != MPD_SEARCH_TITLE ) {
    addErr( "mpd->Search(): invalid search type" );
    return NULL;
    } else {
    if ( is_null($resp = $this->SendCommand(MPD_CMD_SEARCH,$type,$string))) return NULL;
    $searchlist = $this->_parseFileListResponse($resp);
    addLog( "mpd->Search() / return ".print_r($searchlist,true) );
    return $searchlist;
    /* Find()
    * Find() looks for exact matches in the MPD database. The find <type> should be one of
    * the following:
    * MPD_SEARCH_ARTIST, MPD_SEARCH_TITLE, MPD_SEARCH_ALBUM
    * The find <string> is a case-insensitive locator string. Anything that exactly matches
    * <string> will be returned in the results.
    function Find($type,$string) {
    if ( $this->debugging ) echo "mpd->Find()\n";
    if ( $type != MPD_SEARCH_ARTIST and
    $type != MPD_SEARCH_ALBUM and
    $type != MPD_SEARCH_TITLE ) {
    $this->errStr = "mpd->Find(): invalid find type";
    return NULL;
    } else {
    if ( is_null($resp = $this->SendCommand(MPD_CMD_FIND,$type,$string))) return NULL;
    $searchlist = $this->_parseFileListResponse($resp);
    if ( $this->debugging ) echo "mpd->Find() / return ".print_r($searchlist)."\n";
    return $searchlist;
    /* Disconnect()
    * Closes the connection to the MPD server.
    function Disconnect() {
    if ( $this->debugging ) echo "mpd->Disconnect()\n";
    fclose($this->mpd_sock);
    $this->connected = FALSE;
    unset($this->mpd_version);
    unset($this->errStr);
    unset($this->mpd_sock);
    /* GetArtists()
    * Returns the list of artists in the database in an associative array.
    function GetArtists() {
    if ( $this->debugging ) echo "mpd->GetArtists()\n";
    if ( is_null($resp = $this->SendCommand(MPD_CMD_TABLE, MPD_TBL_ARTIST))) return NULL;
    $arArray = array();
    $arLine = strtok($resp,"\n");
    $arName = "";
    $arCounter = -1;
    while ( $arLine ) {
    list ( $element, $value ) = explode(": ",$arLine);
    if ( $element == "Artist" ) {
    $arCounter++;
    $arName = $value;
    $arArray[$arCounter] = $arName;
    $arLine = strtok("\n");
    if ( $this->debugging ) echo "mpd->GetArtists()\n";
    return $arArray;
    /* GetAlbums()
    * Returns the list of albums in the database in an associative array. Optional parameter
    * is an artist Name which will list all albums by a particular artist.
    function GetAlbums( $ar = NULL) {
    if ( $this->debugging ) echo "mpd->GetAlbums()\n";
    if ( is_null($resp = $this->SendCommand(MPD_CMD_TABLE, MPD_TBL_ALBUM, $ar ))) return NULL;
    $alArray = array();
    $alLine = strtok($resp,"\n");
    $alName = "";
    $alCounter = -1;
    while ( $alLine ) {
    list ( $element, $value ) = explode(": ",$alLine);
    if ( $element == "Album" ) {
    $alCounter++;
    $alName = $value;
    $alArray[$alCounter] = $alName;
    $alLine = strtok("\n");
    if ( $this->debugging ) echo "mpd->GetAlbums()\n";
    return $alArray;
    //***************************** INTERNAL FUNCTIONS ******************************//
    /* _computeVersionValue()
    * Computes a compatibility value from a version string
    private function _computeVersionValue($verStr) {
    list ($ver_maj, $ver_min, $ver_rel ) = explode(".",$verStr);
    return ( 100 * $ver_maj ) + ( 10 * $ver_min ) + ( $ver_rel );
    /* _checkCompatibility()
    * Check MPD command compatibility against our internal table. If there is no version
    * listed in the table, allow it by default.
    private function _checkCompatibility($cmd) {
    // Check minimum compatibility
    if (isset($this->COMPATIBILITY_MIN_TBL[$cmd])){
    $req_ver_low = $this->COMPATIBILITY_MIN_TBL[$cmd];
    } else {
    $req_ver_low = "0.9.1";
    // check max compatibility
    if (isset($this->COMPATIBILITY_MAX_TBL[$cmd])){
    $req_ver_hi = $this->COMPATIBILITY_MAX_TBL[$cmd];
    } else {
    $req_ver_hi = "0.20.0";
    $mpd_ver = $this->_computeVersionValue($this->mpd_version);
    if ( $req_ver_low ) {
    $req_ver = $this->_computeVersionValue($req_ver_low);
    if ( $mpd_ver < $req_ver ) {
    addErr("Command '$cmd' is not compatible with this version of MPD, version ".$req_ver_low." required");
    return FALSE;
    // Check maximum compatibility -- this will check for deprecations
    if ( $req_ver_hi ) {
    $req_ver = $this->_computeVersionValue($req_ver_hi);
    if ( $mpd_ver > $req_ver ) {
    addErr("Command '$cmd' has been deprecated in this version of MPD.");
    return FALSE;
    return TRUE;
    * checks the file entry and complete it if necesarry
    * checked fields are 'Artist', 'Genre' and 'Title'
    private function _validateFile( $fileItem ){
    $filename = $fileItem['file'];
    if (!isset($fileItem['Artist'])){ $fileItem['Artist']=null; }
    if (!isset($fileItem['Genre'])){ $fileItem['Genre']=null; }
    // special conversion for streams
    if (stripos($filename, 'http' )!==false){
    if (!isset($fileItem['Title'])) $title = ''; else $title=$fileItem['Title'];
    if (!isset($fileItem['Name'])) $name = ''; else $name=$fileItem['Name'];
    if (!isset($fileItem['Artist'])) $artist = ''; else $artist=$fileItem['Artist'];
    if (strlen($title.$name.$artist)==0){
    $fileItem['Title'] = $filename;
    } else {
    $fileItem['Title'] = 'stream://'.$title.' '.$name.' '.$artist;
    if (!isset($fileItem['Title'])){
    $file_parts = explode('/', $filename);
    $fileItem['Title'] = $filename;
    return $fileItem;
    * take the response of mpd and split it up into
    * items of types 'file', 'directory' and 'playlist'
    private function _extractItems( $resp ){
    if ( $resp == null ) {
    addLog('empty file list');
    return NULL;
    // strip unwanted chars
    $resp = trim($resp);
    // split up into lines
    $lineList = explode("\n", $resp );
    $array = array();
    $item=null;
    foreach ($lineList as $line ){
    list ( $element, $value ) = explode(": ",$line);
    // if one of the key words come up, store the item
    if (($element == "directory") or ($element=="playlist") or ($element=="file")){
    if ($item){
    $array[] = $item;
    $item = array();
    $item[$element] = $value;
    // check if there is a last item to store
    if (sizeof($item)>0){
    $array[] = $item;
    return $array;
    /* _parseFileListResponse()
    * Builds a multidimensional array with MPD response lists.
    * NOTE: This function is used internally within the class. It should not be used.
    private function _parseFileListResponse($resp) {
    $valuesArray = $this->_extractItems( $resp );
    if ($valuesArray == null ){
    return null;
    //1. create empty arrays
    $directoriesArray = array();
    $filesArray = array();
    $playlistsArray = array();
    //2. sort the items
    foreach ( $valuesArray as $item ) {
    if (isset($item['file'])){
    $filesArray[] = $this->_validateFile($item);
    } else if (isset($item['directory'])){
    $directoriesArray[] = $item['directory'];
    } else if (isset($item['playlist'])){
    $playlistsArray[] = $item['playlist'];
    } else {
    addErr('should not enter this');
    //3. create a combined list of items
    $returnArray = array(
    "directories"=>$directoriesArray,
    "playlists"=>$playlistsArray,
    "files"=>$filesArray
    addLog( print_r($valuesArray,true) );
    return $returnArray;
    /* RefreshInfo()
    * Updates all class properties with the values from the MPD server.
    * NOTE: This function is automatically called upon Connect() as of v1.1.
    function RefreshInfo() {
    // Get the Server Statistics
    $statStr = $this->SendCommand(MPD_CMD_STATISTICS);
    if ( !$statStr ) {
    return NULL;
    } else {
    $stats = array();
    $statStr=trim($statStr);
    $statLine = explode( "\n", $statStr );
    foreach ( $statLine as $line ) {
    list ( $element, $value ) = explode(": ",$line);
    $stats[$element] = $value;
    // Get the Server Status
    $statusStr = $this->SendCommand(MPD_CMD_STATUS);
    if ( ! $statusStr ) {
    return NULL;
    } else {
    $status = array();
    $statusStr=trim($statusStr);
    $statusLine = explode("\n", $statusStr );
    foreach ( $statusLine as $line ) {
    list ( $element, $value ) = explode(": ",$line);
    $status[$element] = $value;
    // Get the Playlist
    $plStr = $this->SendCommand(MPD_CMD_PLLIST);
    $array = $this->_parseFileListResponse($plStr);
    $playlist = $array['files'];
    $this->playlist_count = count($playlist);
    $this->playlist = array();
    if (sizeof($playlist)>0){
    foreach ($playlist as $item ){
    $this->playlist[$item['Pos']]=$item;
    // Set Misc Other Variables
    $this->state = $status['state'];
    if ( ($this->state == MPD_STATE_PLAYING) || ($this->state == MPD_STATE_PAUSED) ) {
    $this->current_track_id = $status['song'];
    list ($this->current_track_position, $this->current_track_length ) = explode(":",$status['time']);
    } else {
    $this->current_track_id = -1;
    $this->current_track_position = -1;
    $this->current_track_length = -1;
    $this->repeat = $status['repeat'];
    $this->random = $status['random'];
    $this->db_last_refreshed = $stats['db_update'];
    $this->volume = $status['volume'];
    $this->uptime = $stats['uptime'];
    $this->playtime = $stats['playtime'];
    $this->num_songs_played = $stats['songs'];
    $this->num_artists = $stats['artists'];
    $this->num_songs = $stats['songs'];
    $this->num_albums = $stats['albums'];
    $this->xfade = $status['xfade'];
    if(isset($status['bitrate'])) $this->bitrate = $status['bitrate'];
    else $this->bitrate = FALSE;
    return TRUE;
    /* ------------------ DEPRECATED METHODS -------------------*/
    /* GetStatistics()
    * Retrieves the 'statistics' variables from the server and tosses them into an array.
    * NOTE: This function really should not be used. Instead, use $this->[variable]. The function
    * will most likely be deprecated in future releases.
    function GetStatistics() {
    if ( $this->debugging ) echo "mpd->GetStatistics()\n";
    $stats = $this->SendCommand(MPD_CMD_STATISTICS);
    if ( !$stats ) {
    return NULL;
    } else {
    $statsArray = array();
    $statsLine = strtok($stats,"\n");
    while ( $statsLine ) {
    list ( $element, $value ) = explode(": ",$statsLine);
    $statsArray[$element] = $value;
    $statsLine = strtok("\n");
    if ( $this->debugging ) echo "mpd->GetStatistics() / return: " . print_r($statsArray) ."\n";
    return $statsArray;
    /* GetStatus()
    * Retrieves the 'status' variables from the server and tosses them into an array.
    * NOTE: This function really should not be used. Instead, use $this->[variable]. The function
    * will most likely be deprecated in future releases.
    function GetStatus() {
    if ( $this->debugging ) echo "mpd->GetStatus()\n";
    $status = $this->SendCommand(MPD_CMD_STATUS);
    if ( ! $status ) {
    return NULL;
    } else {
    $statusArray = array();
    $statusLine = strtok($status,"\n");
    while ( $statusLine ) {
    list ( $element, $value ) = explode(": ",$statusLine);
    $statusArray[$element] = $value;
    $statusLine = strtok("\n");
    if ( $this->debugging ) echo "mpd->GetStatus() / return: " . print_r($statusArray) ."\n";
    return $statusArray;
    /* GetVolume()
    * Retrieves the mixer volume from the server.
    * NOTE: This function really should not be used. Instead, use $this->volume. The function
    * will most likely be deprecated in future releases.
    function GetVolume() {
    if ( $this->debugging ) echo "mpd->GetVolume()\n";
    $volLine = $this->SendCommand(MPD_CMD_STATUS);
    if ( ! $volLine ) {
    return NULL;
    } else {
    list ($vol) = sscanf($volLine,"volume: %d");
    if ( $this->debugging ) echo "mpd->GetVolume() / return: $vol\n";
    return $vol;
    /* GetPlaylist()
    * Retrieves the playlist from the server and tosses it into a multidimensional array.
    * NOTE: This function really should not be used. Instead, use $this->playlist. The function
    * will most likely be deprecated in future releases.
    function GetPlaylist() {
    if ( $this->debugging ) echo "mpd->GetPlaylist()\n";
    $resp = $this->SendCommand(MPD_CMD_PLLIST);
    $playlist = $this->_parseFileListResponse($resp);
    if ( $this->debugging ) echo "mpd->GetPlaylist() / return ".print_r($playlist)."\n";
    return $playlist;
    /* ----------------- Command compatibility tables --------------------- */
    var $COMPATIBILITY_MIN_TBL = array(
    MPD_CMD_SEEK => "0.9.1" ,
    MPD_CMD_PLMOVE => "0.9.1" ,
    MPD_CMD_RANDOM => "0.9.1" ,
    MPD_CMD_PLSWAPTRACK => "0.9.1" ,
    MPD_CMD_PLMOVETRACK => "0.9.1" ,
    MPD_CMD_PASSWORD => "0.10.0" ,
    MPD_CMD_SETVOL => "0.10.0"
    var $COMPATIBILITY_MAX_TBL = array(
    MPD_CMD_VOLUME => "0.10.0"
    } // ---------------------------- end of class ------------------------------
    function msort($a,$b) {
    global $sort_array,$filenames_only;
    $i=0;
    $ret = 0;
    while($filenames_only!="yes" && $i<4 && $ret==0) {
    if(!isset($a[$sort_array[$i]])) {
    if(isset($b[$sort_array[$i]])) {
    $ret = -1;
    else if(!isset($b[$sort_array[$i]])) {
    $ret = 1;
    else if(strcmp($sort_array[$i],"Track")==0) {
    $ret = strnatcmp($a[$sort_array[$i]],$b[$sort_array[$i]]);
    else {
    $ret = strcasecmp($a[$sort_array[$i]],$b[$sort_array[$i]]);
    $i++;
    if($ret==0)
    $ret = strcasecmp($a["file"],$b["file"]);
    return $ret;
    function picksort($pick) {
    global $sort_array;
    if(0==strcmp($pick,$sort_array[0])) {
    return "$sort_array[0],$sort_array[1],$sort_array[2],$sort_array[3]";
    else if(0==strcmp($pick,$sort_array[1])) {
    return "$pick,$sort_array[0],$sort_array[2],$sort_array[3]";
    else if(0==strcmp($pick,$sort_array[2])) {
    return "$pick,$sort_array[0],$sort_array[1],$sort_array[3]";
    else if(0==strcmp($pick,$sort_array[3])) {
    return "$pick,$sort_array[0],$sort_array[1],$sort_array[2]";
    ?>

    BaconPie wrote:I used it to make a web based remote control for my phone. Glad it was of some help.
    regarding the phone client, ... there is one in the phpMpReloaded project called IPodMp :-)
    http://phpmpreloaded.sourceforge.net/sc … IPodMp.png
    cheers
    -tswaehn

  • LAMP Installation = broken mpd

    I installed Apache, MySQL, PHP and PHPMyAdmin yesterday in preparation for a project I'll be doing for someone, and now mpd won't start as a daemon; reinstallation didn't help either. Any ideas?  Is there some log file I can check to see why it won't start? I tried starting it when httpd wasn't running to see if there's some problem there, but mpd still wouldn't start.
    Komodo

    raskolnikov wrote:
    Log files are in /var/log/httpd/, you should check at least error_log
    LAMP works for me, so it may be a configuration issue.
    Umm.. well I know where the log files are for apache, but they're unlikely to help me fix mpd   I found the .error and .log files for mpd, they're in $HOME/.mpd/ , but they're both empty! This is really frustrating.. what the hell can it be? mpd was fine yesterday.. it connects on the default port, 6600, is it possible that one of the LAMP pieces of software is interfering with this? Yet if that were the case, surely me stopping all the LAMP-related daemons would allow me to start mpd...
    The only other thing I've change since yesterday is my /etc/hosts:
    127.0.0.1 localhost.localdomain localhost kaminoitte
    That's fine though, isn't it?
    Gaargh, this is doing my head in   :evil:
    EDIT:  Aah.. it might be a groups problem.. maybe. I've got it in my mpd.conf to run under user 'dave', but I accidentally used 'useradd' instead of 'usermod' yesterday when adding myself to the mysql group I made, so I may be missing from one of the necessary groups. I added myself back to optical and video yesterday.. would someone using mpd be good enough to post 'grep [mpd_username] /etc/groups' for me?
    EDIT2 (1 minute later): Hehe, I just noticed I didn't add myself back to 'audio'... what a muppet. Problem solved!  XD

  • [SOLVED: MAJOR PEBCAK] Mpd fails to stream (mp3) to icecast

    EDIT: Wow, that's possibly the most embarassing FAIL I've ever been involved in. In the unlikely event anyone else ever fails as hard though, I will post my solution. I copied over the mpd.conf.example again and re-did it to my needs without screwing with removing all sorts of commented stuff, and came to find it still wasn't working (even after updating mpd). Considering everyone else's stuff seemed to Just Work (TM), I started thinking something seriously stupid must be wrong. Previously, I was using exaile, which apparently didn't stream at my volume, it streamed at a constant (and would keep playing the wrong file even if I switched songs, etc). In order to test if my stream was working on exaile, I lowered the volume on Exaile and played the stream in, for example, Amarok. .... do you see where this is going? That's right.. to test mpd, I lowered the volume to muted levels locally and listened in to the stream on amarok. ..mpd was sending a muted stream. >_<.. turned up the volume a little, played the stream, and to my frustration and surprise the stream was playing off-sync so I could hear it. The last times I tried to do this, I must have clicked into the stream JUST in time to hear mpd go to mute. Which explains why I would occasionally hear second-long or so bits of audio which I thought were some kind of local buffer output amarok was picking up somewhere. I'm not sure why it never clicked until I started raking my brain for the dumbest possible solutions. -_-
    Sigh.
    *MASSIVE HEADDESK*
    Well, it works now. Hooray, anyway.
    Original post:
    I'm beat.. I can't seem to make mpd stream any of my mp3s (or for that matter ogg's, but I only tested 1, which i converted) to my icecast server. Exaile+icast-plugin successfully streams to the server with identical settings afaict, and plays as expected. However, mpd seems to send the song information and an *empty stream*. Zero sound. Mpd on my end otherwise works fine, but the stream fails. I've tried every bloody option I can think of..
    Any ideas? Did I do something dumb somewhere?..
    No errors in the logs i can see.. current ver of mpd, nor the *.14.* old version, nor git version seem to work.
    Edit: Well.. in the icecast error log, I see a bunch of
    [ WARN stats/stats_event_conv No charset found for "ISO8859-1" ]
    errors.. however, that locale already exists on the system. running locale-gen didn't change anything.. and I doubt the relevance.. but I might as well mention it. EDIT2: to be sure, i ran locale -a on the server.. sure enough, it returns en_US, en_US.iso88591, en_US.utf8 plus other stuff. Same goes for local machine..
    login/user information edited out accordingly..
    /etc/mpd.conf on my machine..
    music_directory "/home/myUser/myFolder/Music"
    playlist_directory "/home/myUser/.config/mpd/playlists"
    db_file "/home/myUser/.config/mpd/mpd.db"
    log_file "/home/myUser/.config/mpd/mpd.log"
    pid_file "/home/myUser/.config/mpd/mpd.pid"
    state_file "/home/myUser/.config/mpd/mpdstate"
    user "mpd"
    input {
    plugin "curl"
    audio_output {
    type "alsa"
    name "myAlsa"
    device "hw:0,0" # optional
    format "44100:24:2" # optional
    audio_output {
    type "shout"
    encoding "mp3" # optional
    name "Icecast"
    host "myIP"
    port "8000"
    mount "/mpd"
    password "myPassword"
    bitrate "128"
    format "44100:16:1" # tweaked the crap out of this to no avail
    protocol "icecast2" # optional
    user "source" # optional
    description "Icecast" # optional
    genre "myGenre" # optional
    public "no" # optional
    timeout "10" # optional
    mixer_type "software"
    filesystem_charset "UTF-8"
    /etc/icecast.xml on the server machine..
    <icecast>
    <limits>
    <clients>100</clients>
    <sources>1</sources>
    <threadpool>5</threadpool>
    <queue-size>524288</queue-size>
    <client-timeout>30</client-timeout>
    <header-timeout>15</header-timeout>
    <source-timeout>10</source-timeout>
    <burst-on-connect>1</burst-on-connect>
    <burst-size>65535</burst-size>
    </limits>
    <authentication>
    <source-password>myPassword</source-password>
    <relay-password>myPassword</relay-password>
    <admin-user>myAdmin</admin-user>
    <admin-password>myPassword</admin-password>
    </authentication>
    <hostname>myIP</hostname>
    <listen-socket>
    <port>8000</port>
    </listen-socket>
    <listen-socket>
    <port>8001</port>
    </listen-socket>
    <fileserve>1</fileserve>
    <paths>
    <basedir>/usr/share/icecast</basedir>
    <logdir>/log</logdir>
    <webroot>/web</webroot>
    <adminroot>/admin</adminroot>
    <alias source="/" dest="/status.xsl"/>
    </paths>
    <logging>
    <accesslog>access.log</accesslog>
    <errorlog>error.log</errorlog>
    <loglevel>2</loglevel>
    <logsize>10000</logsize>
    </logging>
    <security>
    <chroot>1</chroot>
    <changeowner>
    <user>myUser</user>
    <group>users</group>
    </changeowner>
    </security>
    </icecast>
    Last edited by FrozenFox (2009-09-01 08:40:26)

    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    Which correspondents fine with the
    device "hw:0,3"
    in my mpd.conf alsa section.
    Also sound worked fine withh this config before I started installing ffmpeg-svn and alikes
    hokasch:
    I tried changing the mixer to "Master" but that did not change much.

  • Listening to Last.fm in MPD

    Hi,
    I'm trying to listen to Last.fm in mpd. I configured it to run with an external application and mpd connects to the stream but for some reason about 4-5 seconds after it starts playing last.fm player stops streaming and the music ends...
    This doesn't happen with xmms.
    Anyone encountered something similar?

    I installed-enabled MS win media player firefox 1.0.0.8, i still did not get streaming, error box comes up and says 'stream load error', the 'windows media test' thing did not work, i tried iheart radio-no luck, so i disabled win media player plug-in dynamic link library 3.0.2629 and tested and still did not work, i also have plug ins: silverlight 5.0.61118.0 and quicktime 7.6.9 7.6.9.0 enabled. I don't know why all of the sudden i have a stream problem with firefox, yesterday, i tried on IE which i never use and had no problem with it. i will try to do more trouble shooting and see, its really frustrating, if can't figure out, i guess will have to revert back to IE which i really don't want to do, but---oh well. thx for help.

  • Adobe Cloud membership - I am stuck in the loop of Licensing VERY Frustrating!!!

    I have an Adobe Cloud membership - I am stuck in the loop of Licensing as well VERY Frustrating - I have a project due and have been troubleshooting for days -
    Un Installing - Re installing - NIGHTMARE  - Please someone help me!!! Thanks in advance -

    What happens when you enter your Adobe ID tied to your subscription?

  • I want to Sync my iPhone 4 to iTunes however I get an error message from iTunes each time I connect the phone to the PC saying that I should restore to factory settings. Frustrating because it's already annoying enough that I can't drag and drop mp3's!!!

    I have never been so frustrated before in my life with any phone. I find it obnoxious as it is that I cannot simply drag and drop files (especially MP3's) straight from my PC directly into my phone, which I have been used to doing up until now. Everyone who convinced me to get the iPhone has instructed me that my frustration can be fixed by downloading iTunes and syncing it all up via that program (which I have never used before). So, I downloaded the program successfully, however when I connect the iPhone 4 to the PC and iTunes is open, I get an error message that 'iTunes cannot read the content of the iPhone "iPhone" and that I should go to the Preferences tab of the iPhone and select 'restore' to restore this phone to factory settings. First of all, I don't understand why I need to do that. I have already downloaded apps and other important things in the 2 days that I have the phone. I am also scared that it will erase my contacts. This is such a headache. Music is very imporatant to me, but I am getting so frustrated that I don't have freedom over the phone which I thought was supposed to be one of the best out there. I would really appreciate help in this matter. I am sure the phone is great but I am on the verge of taking it back and getting something else.

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • Hoping for some help with a very frustrating issue!   I have been syncing my iPhone 5s and Outlook 2007 calendar and contacts with iCloud on my PC running Vista. All was well until the events I entered on the phone were showing up in Outlook, but not

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

  • The app store on my brand new ipod touch offers me majority apps that cannot be used on my software. how do i find apps that will work with 6.1.5? this is frustrating, especially when purchased brand new.

    the app store on my brand new ipod touch offers me majority apps that cannot be used on my software. how do i find apps that will work with 6.1.5? this is frustrating, especially when purchased brand new for christmas.

    See the following to purchase earlier, compatible version for iOS 6
    App Store: Downloading Older Versions of Apps on iOS - Apple Club

  • After I watch a podcast I delete it. When I go back in the next day it shows 500-600 episodes I have to delete manually. So 2 questions....  Is there a way to stop this from happening and is there a way to delete all. This is getting frustrating.

    After I watch a podcast I delete it. When I go back in there are 500-600 episodes and I have to delete each one manually. Is there a way to stop this from happening or is there a way to delete all at once. It's getting very frustrating.

    Had all these issues.  Bit the bullet and downloaded the Downcast App ($1.99).  Much better expereince and a lot more features.  Sad.

  • Self Assigned IP address – can't figure this out. Frustrated.

    This is a long post but bear with me. It proposes a challenge for the mac connoisseur. Who knows? Might be fun?
    OK, here goes:
    Please help. I have been trying to fix this for about 7 months. I first noticed this issue when I started traveling around the country, from hotel to hotel. While others (PC's and Mac's) had no trouble connecting to the free wifi at these hotels, I did. I kept getting "self-assigned i.p."
    This was extremely frustrating. I often had to call up the i.t. guys and ask them to help me manually put in ip address, subnet mask, router (gateway), and dns. This worked much of the time but not always.
    Let me also say that, sometimes it worked perfectly! I'd say about 25% of the time (at these hotels) my internet worked perfectly – just connected immediately. The other 75... "self-assigned i.p."
    I just spoke to the mac "geniuses" and they told me it's not an issue with my computer at all (either hardware or software). Are you kidding me?!?! How can they explain everyone else's internet working except mine. And I'm talking like 100 or more different hotels in a 4 month period. They were trying to tell me that it was just a coincidence every time! "You'd be surprised" one guy said. Hahaha. They said that the routers aren't accepting my computer's whatever. OK, well WHY?! The router works for everyone but me. It's something wrong with my computer right?! Well no one acknowledged this.
    More background info:Just had my airport card and logic board replaced. Computer came back and the sheet said "passed all hardware tests." BUT, none of my issues (I had other ones too involving battery life and not being able to access certain websites) were fixed.
    I went to an apple store. They told me to do an erase and reinstall or whatever. So I did that (by dragging and dropping everything I'd saved on an external hard drive using disk utility). By the way, I also upgraded from leopard to snow leopard. So now, if I have the same issues after this I'll know both leopard and snow leopard are screwed up.... right?
    OK, so I followed their instructions on deleting and reinstalling to a tee and guess what?! Everything worked! Or so it seemed. Battery fine. Websites now accessible. I figured the airport issue was fixed too. But now that I'm not touring anymore and the airport works in my house, I never encountered any issues. Until now. At my work.
    I got a new job and it's one in which I HAVE to have a computer that connects to the internet. So of course, the same issue with self assigned i.p. presents itself. Everyone else in the office has no problem. Including a Mac person that used to work there.
    I've been reading some other threads that are just completely confusing me. One of them might be the solution but I thought I'd detail my troubles so that some smart computer person out there can diagnose my specific problem and give me a specific fix.
    I noticed that many people believe there was a bug in one of the 10.5 updates. I am pretty quick to install updates (maybe I shouldn't be because I hear that the first updates are often buggy and maybe you should wait for a while). But this problem has continued now with Snow Leopard too so... I don't know. I don't know anything anymore. I have tried everything. And Apple is telling me it's not a problem with my computer. Give me a break.
    One more interesting quirk: before doing the erase and reinstall my computer could not find the Apple Store's network. After the erase and reinstall it works. That's why I assumed everything was fine! But no. And now the Mac people are saying there's no problem because they can't see it.
    BTW, I have tried all the obvious things. It's not an obvious thing. But I mean, if you think it is... then tell me I guess. But I've been in the advanced tab thousands of times. I feel like I've exhausted everything in there.
    Thank you thank you thank you in advance if someone is actually able to solve my issue.

    continuation of console log:
    Feb 1 13:08:45 localhost kernel[0]: npvhash=4095
    Feb 1 13:08:45 localhost kernel[0]: PAE enabled
    Feb 1 13:08:45 localhost kernel[0]: 64 bit mode enabled
    Feb 1 13:08:45 localhost kernel[0]: Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386
    Feb 1 13:08:45 localhost kernel[0]: vmpagebootstrap: 507215 free pages and 17073 wired pages
    Feb 1 13:08:45 localhost kernel[0]: standard timeslicing quantum is 10000 us
    Feb 1 13:08:45 localhost kernel[0]: migtable_maxdispl = 73
    Feb 1 13:08:45 localhost kernel[0]: AppleACPICPU: ProcessorId=0 LocalApicId=0 Enabled
    Feb 1 13:08:45 localhost kernel[0]: AppleACPICPU: ProcessorId=1 LocalApicId=1 Enabled
    Feb 1 13:08:45 localhost kernel[0]: calling mpopolicyinit for TMSafetyNet
    Feb 1 13:08:45 localhost kernel[0]: Security policy loaded: Safety net for Time Machine (TMSafetyNet)
    Feb 1 13:08:45 localhost kernel[0]: calling mpopolicyinit for Quarantine
    Feb 1 13:08:45 localhost kernel[0]: Security policy loaded: Quarantine policy (Quarantine)
    Feb 1 13:08:45 localhost kernel[0]: calling mpopolicyinit for Sandbox
    Feb 1 13:08:45 localhost kernel[0]: Security policy loaded: Seatbelt sandbox policy (Sandbox)
    Feb 1 13:08:45 localhost kernel[0]: Copyright (c) 1982, 1986, 1989, 1991, 1993
    Feb 1 13:08:45 localhost kernel[0]: The Regents of the University of California. All rights reserved.
    Feb 1 13:08:45 localhost kernel[0]: MAC Framework successfully initialized
    Feb 1 13:08:45 localhost kernel[0]: using 10485 buffer headers and 4096 cluster IO buffer headers
    Feb 1 13:08:45 localhost kernel[0]: IOAPIC: Version 0x20 Vectors 64:87
    Feb 1 13:08:45 localhost kernel[0]: ACPI: System State [S0 S3 S4 S5] (S3)
    Feb 1 13:08:45 localhost kernel[0]: mbinit: done (64 MB memory set for mbuf pool)
    Feb 1 13:08:45 localhost kernel[0]: rooting via boot-uuid from /chosen: 5924DB5A-4C9F-323F-BC39-2469AEAB4D18
    Feb 1 13:08:45 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string> <key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
    Feb 1 13:08:45 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib load succeeded
    Feb 1 13:08:45 localhost kernel[0]: AppleIntelCPUPowerManagementClient: ready
    Feb 1 13:08:45 localhost kernel[0]: FireWire (OHCI) TI ID 8025 built-in now active, GUID 001b63fffe8a7584; max speed s800.
    Feb 1 13:08:45 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0 /AppleACPIPCI/SATA@1F,2/AppleICH8AHCI/PRT0@0/IOAHCIDevice@0/AppleAHCIDiskDriver /IOAHCIBlockStorageDevice/IOBlockStorageDriver/FUJITSU MHW2120BH Media/IOGUIDPartitionScheme/Untitled@2
    Feb 1 13:08:45 localhost kernel[0]: BSD root: disk0s2, major 14, minor 2
    Feb 1 13:08:45 localhost kernel[0]: [Bluetooth::CSRHIDTransition] switchToHCIMode (legacy)
    Feb 1 13:08:45 localhost kernel[0]: [Bluetooth::CSRHIDTransition] transition complete.
    Feb 1 13:08:45 localhost kernel[0]: CSRUSBBluetoothHCIController::setupHardware super returned 0
    Feb 1 13:08:45 localhost kernel[0]: AppleIntelCPUPowerManagement: initialization complete
    Feb 1 13:08:45 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8055 Singleport Copper SA
    Feb 1 13:08:45 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RXMAXLE 1024, TXMAXLE 768, STMAXLE 3328
    Feb 1 13:08:46 localhost kernel[0]: yukon: Ethernet address 00:1b:63:94:9c:ad
    Feb 1 13:08:46 localhost kernel[0]: systemShutdown false
    Feb 1 13:08:47 localhost kernel[0]: NVDANV50HAL loaded and registered.
    Feb 1 13:08:47 localhost kernel[0]: Previous Shutdown Cause: 5
    Feb 1 13:08:47 localhost kernel[0]: Atheros: mac 12.2 phy 8.1 radio 12.0
    Feb 1 13:08:47 localhost kernel[0]: DSMOS has arrived
    Feb 1 13:08:47 localhost kernel[0]: AirPort_AthrFusion: Ethernet address 00:1e:52:77:13:82
    Feb 1 13:08:47 localhost kernel[0]: IO80211Controller::dataLinkLayerAttachComplete(): adding AppleEFINVRAM notification
    Feb 1 13:08:56 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 1 (Unspecified).
    Feb 1 13:09:05 Michael-Pines-MacBook-Pro kernel[0]: Warning - com.apple.driver.InternalModemSupport declares no kernel dependencies; using com.apple.kernel.6.0.
    Feb 1 13:09:13 Michael-Pines-MacBook-Pro kernel[0]: en1: 802.11d country code set to 'US'.
    Feb 1 13:09:13 Michael-Pines-MacBook-Pro kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
    Feb 1 13:12:08 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:15:38 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    Feb 1 13:15:39 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:18:08 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    Feb 1 13:18:08 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: hibernate image path: /var/vm/sleepimage
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: sizeof(IOHibernateImageHeader) == 512
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: Opened file /var/vm/sleepimage, size 2147483648, partition base 0xc805000, maxio 400000
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: hibernate image major 14, minor 2, blocksize 512, pollers 5
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 7 (Frame received from nonassociated STA).
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: hibernateallocpages flags 00000000, gobbling 0 pages
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: en1: 802.11d country code set to 'US'.
    Feb 1 13:31:48 Michael-Pines-MacBook-Pro kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
    Feb 1 13:31:50 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:31:50 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 7 (Frame received from nonassociated STA).
    Feb 1 13:31:50 Michael-Pines-MacBook-Pro kernel[0]: System SafeSleep
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: hibernatepage_listsetall start
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: hibernatepage_listsetall time: 114 ms
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: pages 274489, wire 35250, act 50684, inact 887, spec 62, zf 137, throt 0, could discard act 24613 inact 28670 purgeable 6142 spec 128044
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: hibernatepage_listsetall found pageCount 87020
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: IOHibernatePollerOpen, mlget_interruptsenabled 0
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: IOHibernatePollerOpen(0)
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: writing 86158 pages
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: image1Size 73471488
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: PMStats: Hibernate write took 4108 ms
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: all time: 4108 ms, comp time: 592 ms, deco time: 0 ms,
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: image 166148608, uncompressed 353234944 (86239), compressed 162715248 (46%), sum1 dc78ee00, sum2 4fe372a2
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: hibernatewriteimage done(0)
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: sleep
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: Wake reason = UHC3
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: System Wake
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: Previous Sleep Cause: 0
    Feb 1 13:41:07 Michael-Pines-MacBook-Pro kernel[0]: USB (UHCI)ort 2 on bus 0x5d has remote wakeup from some device
    Feb 1 13:41:08 Michael-Pines-MacBook-Pro kernel[0]: en1: 802.11d country code set to 'US'.
    Feb 1 13:41:08 Michael-Pines-MacBook-Pro kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
    Feb 1 13:41:09 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:50:04 Michael-Pines-MacBook-Pro kernel[0]: IOHIDSystem::relativePointerEventGated: VBL too high (33307137), capping to 20000000
    Feb 1 13:55:23 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    Feb 1 13:55:23 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 13:59:32 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).
    Feb 1 13:59:32 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 15:24:13 Michael-Pines-MacBook-Pro kernel[0]: systemShutdown true
    Feb 1 15:24:13: --- last message repeated 1 time ---
    Feb 1 15:24:13 Michael-Pines-MacBook-Pro kernel[0]: Kext loading now disabled.
    Feb 1 15:24:13 Michael-Pines-MacBook-Pro kernel[0]: Kext unloading now disabled.
    Feb 1 15:24:13 Michael-Pines-MacBook-Pro kernel[0]: Kext autounloading now disabled.
    Feb 1 15:24:13 Michael-Pines-MacBook-Pro kernel[0]: Kernel requests now disabled.
    Feb 1 15:24:32 localhost kernel[0]: npvhash=4095
    Feb 1 15:24:32 localhost kernel[0]: PAE enabled
    Feb 1 15:24:32 localhost kernel[0]: 64 bit mode enabled
    Feb 1 15:24:32 localhost kernel[0]: Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386
    Feb 1 15:24:32 localhost kernel[0]: vmpagebootstrap: 507215 free pages and 17073 wired pages
    Feb 1 15:24:32 localhost kernel[0]: standard timeslicing quantum is 10000 us
    Feb 1 15:24:32 localhost kernel[0]: migtable_maxdispl = 73
    Feb 1 15:24:32 localhost kernel[0]: AppleACPICPU: ProcessorId=0 LocalApicId=0 Enabled
    Feb 1 15:24:32 localhost kernel[0]: AppleACPICPU: ProcessorId=1 LocalApicId=1 Enabled
    Feb 1 15:24:32 localhost kernel[0]: calling mpopolicyinit for TMSafetyNet
    Feb 1 15:24:32 localhost kernel[0]: Security policy loaded: Safety net for Time Machine (TMSafetyNet)
    Feb 1 15:24:32 localhost kernel[0]: calling mpopolicyinit for Quarantine
    Feb 1 15:24:32 localhost kernel[0]: Security policy loaded: Quarantine policy (Quarantine)
    Feb 1 15:24:32 localhost kernel[0]: calling mpopolicyinit for Sandbox
    Feb 1 15:24:32 localhost kernel[0]: Security policy loaded: Seatbelt sandbox policy (Sandbox)
    Feb 1 15:24:32 localhost kernel[0]: Copyright (c) 1982, 1986, 1989, 1991, 1993
    Feb 1 15:24:32 localhost kernel[0]: The Regents of the University of California. All rights reserved.
    Feb 1 15:24:32 localhost kernel[0]: MAC Framework successfully initialized
    Feb 1 15:24:32 localhost kernel[0]: using 10485 buffer headers and 4096 cluster IO buffer headers
    Feb 1 15:24:32 localhost kernel[0]: IOAPIC: Version 0x20 Vectors 64:87
    Feb 1 15:24:32 localhost kernel[0]: ACPI: System State [S0 S3 S4 S5] (S3)
    Feb 1 15:24:32 localhost kernel[0]: mbinit: done (64 MB memory set for mbuf pool)
    Feb 1 15:24:32 localhost kernel[0]: rooting via boot-uuid from /chosen: 5924DB5A-4C9F-323F-BC39-2469AEAB4D18
    Feb 1 15:24:32 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key> <string ID="1">IOResources</string><key>IOResourceMatch</key> <string ID="2">boot-uuid-media</string></dict>
    Feb 1 15:24:32 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib load succeeded
    Feb 1 15:24:32 localhost kernel[0]: AppleIntelCPUPowerManagementClient: ready
    Feb 1 15:24:32 localhost kernel[0]: FireWire (OHCI) TI ID 8025 built-in now active, GUID 001b63fffe8a7584; max speed s800.
    Feb 1 15:24:32 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0/AppleACPIPCI/SATA@1F,2/AppleICH8AHCI/PR T0@0 /IOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlockStorageDevice/IOBlockStorageDriv er /FUJITSU MHW2120BH Media/IOGUIDPartitionScheme/Untitled@2
    Feb 1 15:24:32 localhost kernel[0]: BSD root: disk0s2, major 14, minor 2
    Feb 1 15:24:32 localhost kernel[0]: [Bluetooth::CSRHIDTransition] switchToHCIMode (legacy)
    Feb 1 15:24:32 localhost kernel[0]: [Bluetooth::CSRHIDTransition] transition complete.
    Feb 1 15:24:32 localhost kernel[0]: CSRUSBBluetoothHCIController::setupHardware super returned 0
    Feb 1 15:24:32 localhost kernel[0]: AppleIntelCPUPowerManagement: initialization complete
    Feb 1 15:24:32 localhost kernel[0]: AppleYukon2: Marvell Yukon Gigabit Adapter 88E8055 Singleport Copper SA
    Feb 1 15:24:32 localhost kernel[0]: AppleYukon2: RxRingSize <= 1024, TxRingSize 256, RXMAXLE 1024, TXMAXLE 768, STMAXLE 3328
    Feb 1 15:24:33 localhost kernel[0]: yukon: Ethernet address 00:1b:63:94:9c:ad
    Feb 1 15:24:33 localhost kernel[0]: systemShutdown false
    Feb 1 15:24:44 localhost kernel[0]: Previous Shutdown Cause: 5
    Feb 1 15:24:44 localhost kernel[0]: Atheros: mac 12.2 phy 8.1 radio 12.0
    Feb 1 15:24:44 localhost kernel[0]: NVDANV50HAL loaded and registered.
    Feb 1 15:24:44 localhost kernel[0]: DSMOS has arrived
    Feb 1 15:24:44 Michael-Pines-MacBook-Pro kernel[0]: AirPort_AthrFusion: Ethernet address 00:1e:52:77:13:82
    Feb 1 15:24:44 Michael-Pines-MacBook-Pro kernel[0]: IO80211Controller::dataLinkLayerAttachComplete(): adding AppleEFINVRAM notification
    Feb 1 15:24:45 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 1 (Unspecified).
    Feb 1 15:24:45 Michael-Pines-MacBook-Pro kernel[0]: en1: 802.11d country code set to 'US'.
    Feb 1 15:24:45 Michael-Pines-MacBook-Pro kernel[0]: en1: Supported channels 1 2 3 4 5 6 7 8 9 10 11 36 40 44 48 52 56 60 64 149 153 157 161 165
    Feb 1 15:24:51 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Up on en1
    Feb 1 15:24:52 Michael-Pines-MacBook-Pro kernel[0]: Warning - com.apple.driver.InternalModemSupport declares no kernel dependencies; using com.apple.kernel.6.0.
    Feb 1 15:25:35 Michael-Pines-MacBook-Pro kernel[0]: AirPort: Link Down on en1. Reason 8 (Disassociated because station leaving).

  • Photoshop CC program error when opening or placing files. VERY FRUSTRATING PLEASE HELP.

    I'm an advertising graduate student that relies heavily on Adobe programs for my multiple simultaneous projects throughout the school year, specifically Photoshop, Illustrator, InDesign, Muse, Edge Animate and Premiere Pro.
    I'm using a MacBook Pro running OS X Yosemite.
    I have been experiencing an incredibly frustrating issue with Photoshop and Muse, both CC 2014. I'll speak about Photoshop in this thread since, well, this is a Photoshop forum. This has been happening for almost a year now. I figured Adobe would've fixed this problem by now, especially given the myriad of crash reports I send.
    While working in Photoshop, sometimes when I go to place a file I get an error message that says "Could not complete your request because of a program error." It used to be that this error was fatal and I would have no other choice but to force quit out of Photoshop and restart it. We all know how incredibly time-consuming it is for Photoshop to open (especially 10-15 times in one sitting), and being in grad school, time is not something I have a lot of when I have deadlines and projects due.
    This error is still happening and for the same reasons; however, now I can still continue to work on my file, as long as I don't need to open a document or place an image...which doesn't help very much because I'm doing a lot of mockups and composites and need those functionalities. It happens probably 90% of the time when I try to place or open a document.
    For the record, it's a similar issue that's causing Muse to crash as well. When I try to add an image file, it causes the entire program to crash "unexpectedly," as Muse so eloquently puts it.
    Until recently I had kept CS6 on my hard drive and would dig it out to use in place of CC when PSCC would crash; however, someone told me that having both versions was likely the cause for the crashes. After much hesitation, I finally uninstalled all of CS6 from my hard drive the other day (the right way, not into the trash can, since someone is inevitably going to ask that question) and I'm still having this problem, and now I don't have my CS6 version to fall back on and now I'm in a really bad spot.
    I apologize for all the rambling, but I'm really very, very frustrated with this error, and I had to do something while waiting for Photoshop to restart. Someone please help.

    MacOS 10.10? Yeah, Apple is working on that bug.  They already fixed the crash in the open/save dialogs, but have a few more problems to address with the open/save dialogs.

  • TS3899 When sending email from the Mail App or through other Apps, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design.

    When sending email from the Mail App or through other Apps on my iPad, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design, especially since I had already checked the From: address.
    iPad 4 running iOS 8.1.3

    3rd party email addresses have to be deleted on every synmced mac product, although I have 1and1.co.uk and my imac updatetes the mails in that account from mac mail.
    Yahoo etc is a 2 step deleting process but good to get your emails pushed when on the go.
    LJ
    http://www.facebook.com/The.Cowboy.Party

  • Creative cloud updates always FAIL. i have tried everything in the forum short of uninstalling all my software--which will take too long. HELP i have very very very frustrated and am spending a lot of money for the pleasure.

    I don't want to start a discussion. i need help. from an adobe tech support. please.
    i have followed the suggestions of dealing with a failed update and nothing works.
    this is high frustrating.
    i repeat: I DON'T NEED HELP FROM OTHER USERS. I WANT A TECH SUPPORT PERSON FROM ADOBE.

    Barbarajones what specific errors are you receiving when you try to apply the update?  Do you receive any specific errors?  What update are you trying to apply?
    If you are looking for direct support then please contact our support team at Adobe - Contact Support – Download and Installation.

Maybe you are looking for

  • Getting javascript error while logging in EP

    Hi,    I have installed EP and after that I got the login screen. Now I logged in as "administrator" and see the 3 roles Content Administration, User Administration and System Administration    But while the screen comes there are many script error p

  • [vbs] [js] [CS2]  Can it alter the size of an only page?

    Can it personalize the size of an only page in InDesign through script? Example: I have four pages in the document. The size of the document is W = "612 pt" and H = "792 pt". Can I alter only the size of page three? Example: W = "300 pt" and H = "450

  • How to use custom API's

    Hi All, In OIM how can i use my own/Custom API"S. Wher do i need to place the Jar/Class files. Like in other Identity Management tools (I only have the experience of SUN) you can place the files under WEB-INF/lib or WEB-INF/classes and then can easil

  • U201Ccom.crystaldecisions.report.web.viewer-600,000 milliseconds timeout

    Could you please help me as I am getting the following error when I run the report fro GUI. I am using the CR10 on UNIX env and Webshere. u201Ccom.crystaldecisions.report.web.viewer.ReportExportControl The request timed out because there has been no

  • Item purchase outside america

    i live in the middle east, the question is can i buy an ipad online from apple using my credit card and have the item sent to my friend living in america?