[ change connection to: standard   |   secure ] Search:  
General Stuff
·   home
·   contact me
·   credits

Misc Code
·   nmap-audit
·   virusNotification

My Projects
·   Carlbooks



              README for mserver
---------------------------------------------------------

1 - About mserver
---------------------------
mserver is a collection of software (PERL CLI for the backend, PHP4 for the 
front end) to alow easy organization, backup, and searching of your mp3 
collection.

This package is under heavy active development, and there are sure to be many 
problems that crop up -- even if for no other reason than different software
versions and operating systems.

This software was developed and tested on an OpenBSD system using PHP4.1.
Security was not a terribly high priorty for the web interface, and there
are instances where someone who is very interested could access information
you may not intend (all leaks _should_ be localized to the mserver system.  If
any others exist, please get in touch with me ASAP and I will make changes).


2 - Setup
---------
  --- apache ---
    * - This setup OPTIONAL, and is only necessary if you wish to use the
        re-encoding feature.

    If you are interested in using the re-encoding feature with the lame program,
    your PHP must be defined to not terminate execution beyond a certain time.

    One method of doing this is by adding the following lines to your httpd.conf
    file:
         
            php_value max_execution_time 0
         
    Another technique would be to change the variable max_execution_time to 0
    in your php.ini file.

  --- mysql ---
    All configuration should be taken care of by running the db.sql script
    located in the db directory.  Please edit the db.sql file and change
    the values where it is noted.

    As root, run the command
    	mysql -u root -p password database < db.sql
    on the db.sql file you just modified to create the database, add a user
    for the database, and to install the SQL scheme into the new database.
    It will also insert a first user for the mserver system with administrator
    privilage.  More users can be created after loggin in with user/password
    "mserver" via the Web administration tool.

    More information on this process is available in the help file located
    in the db directory.

  --- frontend web files  ---
    REQUIREMENTS:
    - Apache with mod_rewrite.  To check if you have this, try:
    	httpd -l
      you will see it listed if it has been activated in your server.
      If it is not listed, you may activate this when configuring Apache by
      giving the switch '--enable-module=rewrite' to configure.
    - PHP4 with mysql support.
    - lame mp3 encoder is optional -- necessary only if you are interested in
      having selected mp3 streams reencoded to a specific bitrate.

    VARIABLES:
    - Change the variables in frontend/config.php.  More instructions are
      available in that file.  This will setup some of your basic paths,
      preferences, and MySQL information.
    - In the admin/.htaccess file, make sure to change the AuthUserFile directory
      to something appropriate for your system.  To create the file, take a look
      at the manual for htpasswd (man htpasswd).

    OPERATION:
    - There is an .htaccess file in both the frontend directory and the 
      frontend/admin directory.  Make sure that your copy operation successfully
      copies these files.
    - Add a user to the system from the admin pages.

  -- general backend --
    All configuration settings are stored in a file called '.mserver'.  This file
    must be in either your home directory or in the working directory where the
    scripts are called.

    The file is well documented and must be editted before any of the backend
    scripts described below will function.  An example is located in the backend
    directory called 'EXAMPLE.mserver'.  Please use this as a start by copying
    and renaming it to '~/.mserver'.

  --- msadd ---
    ABOUT:
      Use this program to add music into the system.  The default operation is
      to move all music files from the specified incoming directory to the best
      location available on the machine.  Run with '--help' to see the command
      line options to change this behavior, specifically to copy rather then
      move, and to use a different incoming directory.

      If a file is already in the mserver database, it is just deleted from the
      incoming directory and both the old entry in the database and the file
      corresponding to the entry remain untouched.

      When running, please make sure that you have the ability to write to the
      files that msadd is trying to move.  If the files cannot be moved, an
      entry will be made in the database, but it will not point to a file (since
      the file does not exist).
    REQUIREMENTS:
    - Mysql PERL module
    - MP3::Info PERL module

    OPERATION:
    - 'msadd' will process all files in the defined $ROOT_PATH
      directory.
    - Each file in the directory will have its ID3 tag read.  You will be
      prompted to fill in all artists, albums, and songnames where there are
      missing fields.  To save time, you may accept the default value (located
      between the brackets) by hitting enter.  All information provided is 
      saved back into the mp3 file's ID3 tag.
    - The information read/provided will be stored in the MySQL database,
      and the songs can now be accessed via the web interface.

  --- msbackup ---
    ABOUT:
      This script can be used to make backup ISOs of the music stored in the
      mserver system, which can then be burned to CDs.  Each CD has enough
      information stored on it so that the database can be recovered.  Also,
      the mserver database is able to locate the CDs on which any songs are
      saved to.

    REQUIREMENTS:
    - Mysql PERL module
    - cdrtools version 1.10 or greater

    OPERATION:
    - 'msbackup [n]' will write up to n ISOs (or just one if no
      number is specified).
    - The ISO contains a list of all the files added to it, and the database
      has the information of what disc has what mp3s.  The script tries to 
      keep artists and albums on the same ISO.

  -- msclean --
    ABOUT:
      Use to clean up the mserver database and the mserver filesystem.  This
      will remove entries from the database that have no corresponding files,
      and it will also remove empty directories in the MP3 hierarchy.

    REQUIREMENTS:
    - Mysql PERL module

  -- msdelete --
    ABOUT:
      Will delete files in the hierarchy that have been marked (through the web
      frontend) to be taken offline.  Will only remove files that have been
      backed up with the msbackup script.  Usefull for infrequently listened to
      music offline when space becomes short.

    REQUIREMENTS:
    - Mysql PERL module

  --- msprint ---
    ABOUT:
      Used to general an HTML file containing a directory of all artists, albums
      and songs on the system.  This can be printed out and used along with the
      quickadd option to easily find music to play.

    REQUIREMENTS:
    - Mysql PERL module

    OPERATION:
    - Command line options given when running msprint with no options.

  --- mscp ---
    ABOUT:
      Used by a client to copy the files in an M3U playlist from the server.
      Has command line options to intelligently name the downloaded files, as
      well as to re-encode the files to different bitrates.  This may be usefull
      for getting the music to a machine to burn to a CD or to copy onto an
      MP3 player.

    OPERATION:
    - Command line options given when running msprint with no options.

3 - Changelog
-------------
v1.46 (2002.06.06):
   - Fixed bug in choosePlaylist.php and in viewPlaylist.php
   - Added default artist, album, and songname capability to
     msadd

v1.45 (2002.05.16):
   - Fixed bug in artistSearch page

v1.44 (2002.05.16):
   - Moved all backend config to one file for easier installation
   - Added msclean, msdelete scripts
   - Changed presentation of playlists
   - Files can be marked for removal
   - Search will look for either only online files or both online
     and offline files

v1.43 (2002.04.13):
   - Moved all php config to one file for easier installation
   - Correct count of songs displayed in artistBrowse
   - Number of results returned is now displayed in artistSearch,
     songSearch, artistBrowse, songBrowse.

v1.42 (2002.04.12):
   - Fixed bug in quickadd that gave bad links for songs

v1.41 (2002.04.10):
   - Added sensible defaults to getSettings.php
   - Modfied m3u.php to accepts more options
   - Playlist support added
   - Quickadd supprot added
   - Song upload support added
   - Client setup help added
   - Renamed backup applications from catalog.pl to msadd and from backup.pl
     to msbackup
   - Added reEncode.pl to transfer and modify songs from the command line
   - Added msprint to print out  a hardcopy of songs with quickadd support

v1.40 (2002.01.24):
   - Modified m3u.php so that adding an album with a common album name will
     add only the specified artists album
   - Added client script reEncode.pl

v1.39 (2002.01.24):
   - Fixed error in artistSearch.php, artistBrowse.php, songSearch.php, 
     songBrowse.php, and .htaccess that gave 404's when the mserver
     system was not in the root web directory

v1.38 (2002.01.23):
   - Included ccalc in distribution
   - fixed bug in viewPlaylist.php that prevented songs from being added

v1.37 (2002.01.21):
   - Initial public release


4 - Todo
--------
   - curses interface to msadd
   - implement command line options
   - store all configuration options in a single file so there is no
     need to edit the PERL files


5 - Author
----------

Written by Keith Resar (3af86bc67c874@heavyk.org).

Mail me any comments: improvement suggestions, bug reports, "hey I'm using this
and I kinda like it" reports, etc.

If you are having setup problems, please run:
	(echo 'First M. Last'; httpd -l) | mail 3af86bc67c874@heavyk.org









Last modified: December 03 2006.