Configuration: Main File

From ReservesDirect: Open Source EReserves System

Home :: Features :: Screenshots :: Demo (http://www.reservesdirect.org/demo/index.html) :: Documentation :: Downloads :: Support :: Blog (http://www.reservesdirect.org/blog) :: Join Us!
ReservesDirect Documentation:   Contents | Library staff handbook | System administrator handbook | Developer handbook
Table of contents

Overview

The config file (config.xml) is a simple XML document that is used to define system wide configuration settings.

Editing the Configuration

The config.xml is located in the base directory of the distribution and for security should be moved to a location on the file system outside of the web root. The location of the this file is indicated in the config_loc.inc.php file. Edit to indicate the location in your filesystem, this may be an absolute or relative path.

	
        //set path to configuration file
        $xmlConfig = "/CHANGEME/etc/reservesdirect/config.xml";

Permissions on config.xml must be set so that it is readable by the apache process, but not readable by any other user (except root).

Values that require changing contain the string "CHANGEME" as a placeholder. Config.xml is generally organized into sections of related settings.

Database

The database section sets the DSN values used by DB::connect. These are:

  1. dbtype (currently, "mysql" is the only valid value)
  2. username (username that php uses to connect to the database)
  3. pwd (password for this user)
  4. host (usually "localhost")
  5. dbname (name of your ReservesDirect database)

If using MySQL you will most likely modify only the username, pwd, host and dbname fields. The pwd (password) is unencrypted, therefore the configuration file should not be placed within the web root, and should only be readable by the apache user (and root).

See the Pear DB::connect (http://pear.php.net/manual/en/package.database.db.php) documentation at pear.php.net for more detail

The <ssl> and <debug> elements are not implemented yet.

 
    <database>
        <dbtype>mysql</dbtype>
        <username>CHANGEME</username>
        <pwd>CHANGEME</pwd>
        <host>localhost</host>
        <dbname>CHANGEME</dbname>
        <ssl>true</ssl>
        <debug>true</debug>
    </database>

Catalog

This section defines values used to connect to the ILS system. The <useCatalog> value is not implemented yet, but it is still possible to use the software without physical reserves integration (though the administrative interface "breaks" at points where it would interact with your ILS).

The values zhost, zport, and zdb are used to specify the host, port and database for z39.50 connections to your ILS. The zReflector value is currently used to point to a z39.50 broker script (zGizmo.cgi) which takes a simplified search syntax, makes the z39.50 connection (currently configured for Sirsi Unicorn's Bath Profile), and returns MARCXML output to ReservesDirect. Eventually we would like to program SRW/U capabilities in ReservesDirect to replace this script.

If your ILS has the capability to conduct item searches through a url, you may be able to take advantage of the <web_search> element to perform bibliographic lookups, even if you are not using Sirsi Unicorn

 
    <catalog>
        <catalogName>CHANGEME</catalogName>
        <useCatalog>yes</useCatalog> <!-- all others may be blank if no -->
        <zhost>CHANGEME.example.edu</zhost>
        <zport>2200</zport>
        <zdb>Unicorn</zdb>
        <zReflector>http://CHANGEME.example.edu/cgi-bin/zGizmo.cgi</zReflector>
        <reserve_script>https://CHANGEME.example.edu/uhtbin/create_reserve</reserve_script>
        <holdings_script>http://CHANGEME.example.edu/uhtbin/holding_request</holdings_script>
        <display_reserve>http://CHANGEME.example.edu/uhtbin/display_reserve</display_reserve>
        <web_search>http://CHANGEME.example.edu/uhtbin/cgisirsi/a/1/2/3/?searchdata1=</web_search>
    </catalog>

ILS Scripts

In the current implementation of ReservesDirect, scripts must be written for the ILS in order to create a reserve item in the ILS' reserves module (if such exists), and to query the ILS for holding information.

Sirsi Unicorn

Due to intellectual property issues regarding the Unicorn API, we are not able to freely distribute the ILS scripts described below. We will endeavor to make them available by other means to Sirsi customers.

Reserve Script

The pointer to the reserve script is specified in the config.xml file

<reserve_script>https://reservesdirect.org/uhtbin/create_reserve</reserve_script>

This script must accept parameters as URL parameters and is called from Staff::createILS_record found in the /secure/interface/staff.class.php

Values passed to the script are:

  1. itemID -- the barcode of the item scanned by the reserve staff
  2. borrowerID -- the ILS user_id for the requesting instructor this is assumed to be the primary instructor for the class
  3. courseID -- course designation as specified within the ILS currently we append the ILS_prefix
  4. reserve_desk -- The reserves desk where the item will be placed
  5. circ_rule -- circulation rule to be applied to the item
  6. &alt_circ -- secondary circulation rule
  7. expiration -- expiration date in M/D/Y
  8. cpy -- the sequence number of the item, indicates which copy of identical holdings is reserved.
Holding Script

This script returns holding information for items, designated by barcode that have been placed on reserve. Items which are not on reserve are not returned.

LDAP

The ldapHost is the fully qualified domain name of your institution's LDAP directory. You can consult your LDAP administrator for the values of the other ldap settings. We strongly recommend using port 686 to authenticate to your LDAP directory (otherwise usernames and passwords will be passed over the network in clear text, never a good thing).

 
    <ldap>
        <ldapHost>CHANGEME</ldapHost>                <!-- host name or IP address of ldap server; "localhost" if using stunnel -->
        <ldapDomain>CHANGEME.example.edu</ldapDomain>     <!-- domain that holds ldap user accounts -->
        <ldapPort>CHANGEME</ldapPort>                <!-- "686" if connecting securely (ldaps), otherwise "389" -->
        <ldapVersion>3</ldapVersion>                    <!-- ldap version, usually "3" -->
        <baseDistinguishedName>CHANGEME</baseDistinguishedName>
        <userAttributes>                    <!-- attributes, if available, used to seed new user profile in RD -->
            <canonicalName>CHANGEME</canonicalName>        <!-- user's id (used to bind/authenticate) -->
            <email>CHANGEME</email>                <!-- email address (optional) -->
            <firstName>CHANGEME</firstName>        <!-- user's first name (optional) -->
            <lastName>CHANGEME</lastName>                <!-- user's last name (optional) -->
        </userAttributes>
    </ldap>

Error Log

Critical Errors are logged to this file location

 
     <error_log>/path_to/reserves2_1/error.log</error_log>

Email address

errorEmail - errors are sent to this address as well as logged to the error_log

reservesEmail - email address for the Reserves Desk Staff

adminEmail - System Admins not used

 
     <errorEmail>demo@reservesdirect.org</errorEmail>
     <reservesEmail>demo@reservesdirect.org</reservesEmail>
     <adminEmail>demo@reservesdirect.org</adminEmail>

Faxed Documents

Documents can be added by faxing them to the system, provided it is equipped with one or more fax modems, and Hylafax (or an alternative fax server) is installed and configured. Faxed documents will be converted to PDF format by a post-processing script that makes use of Fax2pdf.


directory - The absolute pathname of the directory where ReservesDirect will retrieve processed faxes.

URL - The absolute URL to the directory above, used to display fax documents. When faxed items are added to the database, this location is written with the record. Changes to this path may require a database update.

copyright - The absolute pathname of a single-page PDF file to be added as the first page of documents received via Hylafax.

log - The absolute pathname of the log file used to record errors from the fax processing script.

fax2pdf_bin - The absolute pathname of the Fax2pdf binary, used to convert G3 fax format to PDF.

faxinfo_bin - The absolute pathname of the faxinfo binary, a utility included with Hylafax.

gs_bin - The absolute pathname of the gs Ghostscript binary, used to add the copyright page to processed faxes.

 
    <fax>
        <directory>/var/www/html/CHANGEME/incoming/</directory>  <!-- include trailing / -->
        <URL>http://CHANGEME.example.edu/CHANGEME/incoming/</URL>  <!-- include trailing / -->
        <copyright>/var/www/CHANGEME/copyright.pdf</copyright>
        <log>/var/spool/hylafax/log/CHANGEME.log</log>
        <fax2pdf_bin>/CHANGEME/path/to/fax2pdf</fax2pdf_bin>
        <faxinfo_bin>/CHANGEME/path/to/faxinfo</faxinfo_bin>
        <gs_bin>/CHANGEME/path/to/gs</gs_bin>
    </fax>

Uploaded Documents

Documents can be added to the system by browser upload. This section specifies the storage locations on your servers.

documentDirectory - filesystem path where uploaded documents are stored

documentURL - absolute URL to the documentDirectory used to display uploaded documents. When uploaded items are added to the DB this location is written with the record. Changes to this path may require a DB update.

documentCover - cover page added to the faxed documents to display generic copywrite message

 
     <documentDirectory>/path_to/html/uploaded/</documentDirectory>  <!-- include trailing / -->
     <documentURL>http://reservesdirect.org/uploaded/</documentURL> <!-- include trailing / -->
     <documentCover>/path_to/html/projects/reserves2_1/admin/copyright.pdf</documentCover>

Miscellaneous

Example Main Configuration File

 
   <configuration>
     <catalog>
       <useCatalog>yes</useCatalog> <!-- all others may be blank if no -->
       <zhost>reservesdirect.org</zhost>
       <zport>2200</zport>
       <zdb>Unicorn</zdb>
       <zReflector>http://reservesdirect.org/cgi-bin/zGizmo.cgi</zReflector>
       <reserve_script>https://reservesdirect.org/uhtbin/create_reserve</reserve_script>
       <holdings_script>http://reservesdirect.org/uhtbin/holding_request</holdings_script>
       <display_reserve>http://reservesdirect.org/uhtbin/display_reserve</display_reserve>
     </catalog>
     <error_log>/path_to/reserves2_1/error.log</error_log>
     <errorEmail>demo@reservesdirect.org</errorEmail>
     <reservesEmail>demo@reservesdirect.org</reservesEmail>
     <adminEmail>demo@reservesdirect.org</adminEmail>
     <faxDirectory>/path_to/html/incoming/</faxDirectory>  <!-- include trailing / -->
        <faxURL>http://reservesdirect.org/incoming/</faxURL>  <!-- include trailing / -->
        <documentDirectory>/path_to/html/uploaded/</documentDirectory>  <!-- include trailing / -->
        <documentURL>http://reservesdirect.org/uploaded/</documentURL> <!-- include trailing / -->
        <documentCover>/path_to/html/projects/reserves2_1/admin/copyright.pdf</documentCover>
        <siteURL>https://reservesdirect.org/</siteURL>	
        <specialUserEmail>
                <subject>Special Account Created</subject>
                <msg>
                        An account was created for you with the Reserves Direct system.  
                        Please log in as ? password ?
                </msg>
        </specialUserEmail>
        <EmailRegExp>^(.+)@(.+)$</EmailRegExp>	
        <no_javascript_msg>
            A scan of your computer shows that javascript is disabled, some features of Reserves2.1 require
            javascript.<br/> Please contact ITD support if you require assistance to enable javascript.
        </no_javascript_msg>	
        <request_notifier>
            <last_run>2004-12-21</last_run>
        </request_notifier>
   </configuration>