Installation of the dmBridge core (HTTP API) involves two main steps: installation of the core itself, and installation of the configuration data.

Please read these steps very carefully.

  1. Move the dm/data folder somewhere where it is not web-accessible. This may be anywhere outside your web server's document root; or you may be able to lock down a directory with an Apache/IIS configuration directive. Failure to complete this step means that your database password and/or social data will be exposed to the public.
  2. Make sure the permissions on the dm/data folder are set so that the web server process has read/write access to all of the files and folders inside it.
  3. CONTENTdm® 4.x only; if running 5.x, skip to the next step. In Content4/docs/dmscripts/DMSystem.php, find the following line near the very top:

    $slash = getPath();

    And change it to (don't worry, this shouldn't adversely affect anything):

    // Modified for dmBridge (your name, date)
    $slash = $_SERVER['DOCUMENT_ROOT'] . '/';
    // $slash = getPath(); // commented out for dmBridge
  4. CONTENTdm® 5.x only; if running 4.x, skip to the next step. In Content5/docs/dmscripts/DMSystem.php, find the following around line 1811:

    print("<!-- $url //-->\n");

    And comment it out by appending two slashes to it:

    // print("<!-- $url //-->\n");

  5. Open api/config.php.
  6. Change CDM_ROOT to the absolute path to your CONTENTdm® PHP API folder (called dmscripts).
  7. Change DATA_ROOT to the absolute path to your data folder from step 1. (Locating it with a relative path ["../"] will not work.)

    If you are unsure of the absolute path, create an empty PHP script in the same folder, type the following code into it, and load it in a web browser:

    <?php die(dirname(__FILE__)); ?>

  8. This will show you the full path to your dmBridge core folder. Adjust it appropriately to point to your data folder instead. Make sure to change any backslashes to forward slashes.

  9. If necessary, change the other settings in the file. If not sure, skip to the next step.
  10. Navigate to the following URLs and verify that they output XML without any <dmException> elements showing up (you may have to view the page source to see it):
    • http://my_cdm_server/dm/api/?r=collections.xml
    • http://my_cdm_server/dm/api/?r=objects/uw.xml
    • http://my_cdm_server/dm/api/?r=objects/uw/5.xml

    (Change "/uw" in the URLs above to a different collection alias ("CISOROOT") if the Sample Collection is not live on your CONTENTdm® server.)

If everything appears OK, the installation was successful. This was the hardest component to install; the others will be easier.