MedDream for DCM4CHEE Quick Install (Windows and Linux) GENERAL NOTES: WARNING: compatibility was tested only with DCM4CHEE 2.4.17, 4.3.0-Alpha4 and 5.6.0. WARNING: DCM4CHEE v4 and v5 (dcm4chee-arc) have been tested with MySQL and Oracle only. WARNING: DCM4CHEE v2 has been tested with MySQL and MS SQL Server only. WARNING: the integrated Reports functionality is so far implemented only for MySQL and Oracle. There are no schema files for MSSQL and existing queries are incompatible with this DBMS. Under Windows, a thread-safe (TS) 32-bit PHP build is required. The DLLs included won't work with a 64-bit PHP, like in 64-bit builds of WampServer. Under Linux, a non-TS PHP build is required. This is related to a more common build of Apache, the "prefork". The "worker" build is incompatible. For the Send to DICOM Library Anonymizer, Java 7 and up is required. PHP 5.3 is built for Windows either with VC6 or VC9 runtime. Take note which version you have, and use a corresponding .dll during installation as explained below. Otherwise you'll get an error message like this one: Module compiled with build ID=API20090626,TS,VC6 PHP compiled with build ID=API20090626,TS,VC9 These options need to match Under Linux, the .so file requires glibc 2.5 or later. During an upgrade it's recommended to use the included config.sample-dcm4chee.php or config.sample-dcm4chee-arc.php as a template and then update the resulting config.php according to the old one. This will prevent misunderstandings like variable names which were suddenly changed. MedDream is able to automatically include a DICOMDIR viewer in each disc of exported studies. To use that, simply place the viewer files in a subdirectory named "DICOMDIR". You must also ensure that a file named "autorun.inf" exists in that directory, otherwise contents won't be included; an empty autorun.inf is suitable if the viewer somehow doesn't contain it. MySQL from XAMPP 1.8 for Windows: if MedDream connects to the database very slowly (each attempt takes about 1 second), then try adding "bind-address = ::" to my.ini. While still in demo mode, you *must* remove the existing meddream.lic after changing computer's host name (any OS), reinstalling the OS (Windows) or changing the MAC of any network card (Linux). A correct file will be created automatically. Otherwise a commercial license generated from your meddream.lic will not work. This also means that Windows must be activated in advance! dcm4chee-arc requires that the path prefix (filesystem.fs_uri, default value specified in LDAP as "dcmInitFileSystemUri") contains a URI scheme. MedDream supports the following syntax: file:///dir/subdir1 => /dir/subdir1 file:/dir/subdir2 => /dir/subdir2 file:///:/subdir1 => :/subdir1 file:/:/subdir2 => :/subdir2 file://host/share/dir => //host/share/dir (Windows only) file:///host/share/dir => /host/share/dir file:////host/share/dir => //host/share/dir Starting from 5.5, MedDream adds the option "-y" to FFmpeg command line when extracting a thumbnail from a video file. If you are forced to use an older version of FFmpeg that doesn't understand this option, then add the following to php.ini: meddream.thumb_ffmpeg_cmdline = "-i ?I -f image2 ?O" Starting from 5.5, support for DICOM overlays is on by default and MedDream will attempt to patch the image with data from the (6000,3000) tag. If some images fail to open after upgrade to 5.5 and logs contain the string "Error" related to output of meddream_thumbnail / meddream_convert2, then try to turn off the overlays by adding the following to php.ini: meddream.overlays_enabled = 0 WINDOWS INSTALL: 1. Copy meddream folder to APACHE_HTDOCS_DIR (so that the result is APACHE_HTDOCS_DIR/meddream; for example, in our machines it usually is C:\xampplite\htdocs\meddream.) If you are updating an older version of MedDream: a) Please back up the old version (so you can go back any time). b) Please do not replace files you changed in last version. You must carefully synchronize the new version 2. From APACHE_HTDOCS_DIR\meddream copy php5.3_meddream-VC6.dll to PHP_INSTALL_DIR\ext (if you are using PHP 5.3.x, VC6 build) copy php5.3_meddream-VC9.dll to PHP_INSTALL_DIR\ext (if you are using PHP 5.3.x, VC9 build) copy php5.4_meddream.dll to PHP_INSTALL_DIR\ext (if you are using PHP 5.4.x) copy php5.5_meddream.dll to PHP_INSTALL_DIR\ext (if you are using PHP 5.5.x) copy php5.6_meddream.dll to PHP_INSTALL_DIR\ext (if you are using PHP 5.6.x) 3. Add to php.ini file "extension=php5.3_meddream-VC6.dll" (if you are using PHP 5.3.x, VC6 build) "extension=php5.3_meddream-VC9.dll" (if you are using PHP 5.3.x, VC9 build) "extension=php5.4_meddream.dll" (if you are using PHP 5.4.x) "extension=php5.5_meddream.dll" (if you are using PHP 5.5.x) "extension=php5.6_meddream.dll" (if you are using PHP 5.6.x) 4. Specify date.timezone in php.ini: [Date] ; Defines the default timezone used by the date functions date.timezone = "America/Chicago" (the list of possible values is at http://www.php.net/manual/en/timezones.php) 5. Edit APACHE_HTDOCS_DIR/meddream/config.php file. Use config.sample-dcm4chee.php or config.sample-dcm4chee-arc.php as a template. The file contains basic instructions. 6. Add "studynotes" table to DCM4CHEE database from the schema file reports-dcm4chee-mysql.sql if you're using MySQL. For dcm4chee-arc/dcm4chee-arc-lite and Oracle, use reports-dcm4chee-arc-oracle.sql instead. 7. Add "attachments" table to DCM4CHEE database from the schema file attachments-dcm4chee-mysql.sql if you're using MySQL. For dcm4chee-arc/ dcm4chee-arc-lite and Oracle, use attachments-dcm4chee-arc-oracle.sql instead. 8. Restart Apache 9. Navigate to http://127.0.0.1/meddream/home.php (use database accounts or DCM4CHEE accounts to log in). 10. Make sure meddream\bin\deleteTemp.bat is run every night by Task Scheduler. See chapter "INSTALLATION" in quick_install-Scripts.txt for a recipe. LINUX INSTALL: 1. Copy the "meddream" directory to APACHE_HTDOCS_DIR (so that the result is APACHE_HTDOCS_DIR/meddream; for example, in our machines it usually is /var/www/meddream.) Adjust permissions: no less than 0777 for APACHE_HTDOCS_DIR/meddream 0777 for APACHE_HTDOCS_DIR/meddream/log 0777 for APACHE_HTDOCS_DIR/meddream/temp Additionally, chmod a+x APACHE_HTDOCS_DIR/meddream/dcm4che/bin/* chmod a+x APACHE_HTDOCS_DIR/meddream/*.sh chmod a+x APACHE_HTDOCS_DIR/meddream/dcmtk/dsr2html If you are updating an older version of MedDream: a) Please back up the old version (so you can go back any time). b) Please do not replace files you changed in last version. You must carefully synchronize the new version 2. From APACHE_HTDOCS_DIR/meddream copy php5.3_meddream.so to /usr/lib/php/modules (if you are using PHP 5.3.x) copy php5.4_meddream.so to /usr/lib/php/modules (if you are using PHP 5.4.x) copy php5.5_meddream.so to /usr/lib/php/modules (if you are using PHP 5.5.x) copy php5.6_meddream.so to /usr/lib/php/modules (if you are using PHP 5.6.x) copy php5.3_meddream-x86_64.so to /usr/lib64/php/modules (if you are using PHP 5.3.x under a 64-bit OS) copy php5.4_meddream-x86_64.so to /usr/lib64/php/modules (if you are using PHP 5.4.x under a 64-bit OS) copy php5.5_meddream-x86_64.so to /usr/lib64/php/modules (if you are using PHP 5.5.x under a 64-bit OS) copy php5.6_meddream-x86_64.so to /usr/lib64/php/modules (if you are using PHP 5.6.x under a 64-bit OS) 3. Add to /etc/php.ini file "extension=php5.3_meddream.so" (if you are using PHP 5.3.x) "extension=php5.4_meddream.so" (if you are using PHP 5.4.x) "extension=php5.5_meddream.so" (if you are using PHP 5.5.x) "extension=php5.6_meddream.so" (if you are using PHP 5.6.x) "extension=php5.3_meddream-x86_64.so" (if you are using PHP 5.3.x under a 64-bit OS) "extension=php5.4_meddream-x86_64.so" (if you are using PHP 5.4.x under a 64-bit OS) "extension=php5.5_meddream-x86_64.so" (if you are using PHP 5.5.x under a 64-bit OS) "extension=php5.6_meddream-x86_64.so" (if you are using PHP 5.6.x under a 64-bit OS) 4. Specify date.timezone in php.ini: [Date] ; Defines the default timezone used by the date functions date.timezone = "America/Chicago" (the list of possible values is at http://www.php.net/manual/en/timezones.php) 5. Edit APACHE_HTDOCS_DIR/meddream/config.php file. Use config.sample-dcm4chee.php as a template. The file contains basic instructions. 6. Add "studynotes" table to DCM4CHEE database from the schema file reports-dcm4chee-mysql.sql if you're using MySQL. For dcm4chee-arc/dcm4chee-arc-lite and Oracle, use reports-dcm4chee-arc-oracle.sql instead. 7. Add "attachments" table to DCM4CHEE database from the schema file attachments-dcm4chee-mysql.sql if you're using MySQL. For dcm4chee-arc/ dcm4chee-arc-lite and Oracle, use attachments-dcm4chee-arc-oracle.sql instead. 8. Restart Apache 9. Navigate to http://127.0.0.1/meddream/home.php (use database accounts or DCM4CHEE accounts to log in). 10. Make sure meddream/bin/deleteTemp.sh is run every night by cron. See chapter "INSTALLATION" in quick_install-Scripts.txt for a recipe. 11. mkisofs is required for the Export command. If your distribution has only genisoimage, then you need to create a symlink to it named "mkisofs". 12. To display SR files, we are using a prebuilt binary meddream/dcmtk/dsr2html from DCMTK 3.6.0. If your distribution provides another version of it that works better, then you'll need to replace "dsr2html" and "dicom.dic" with symlinks to your copies. 13. To display videos of any kind, v5.5 needs FFmpeg dated not older than 2014-03-08. If yours is older and can't be updated, then you need at least to switch to the legacy behavior by changing "const USE_FFMPEG_SUBFILE = true" in flv.php to an opposite value (false). 14. To display non-BD-compatible MPEG4 videos (Transfer Syntax UID 1.2.840.10008.1.2.4.102), latest version of FFmpeg might be required.