Linux installation of ConQuest

  • I'm currently testing the installation of ConQuest under both Linux and Windows, both with a DBase installation and with a MySQL installation.


    I'll be making notes here as I go along (if there are any suggestions, I'll happily read through them), and hopefully that will help others. (including the developers)


    The system I'm developing on (Linux) is Slackware 11.0 with 512 megabytes of ram and a 160 GB hard drive. I'm doing the compilation through a Konsole window in KDE.


    First note is that the Linux download is in a .zip format. This can be read in most *nix systems, (BSD/Linux/Unix/Solaris/etc), but it's not a 'native' format. a tar.bz or tar.gz would be a more usual choice.


    Unpacking the conquestlinux1412.zip file builds a strange directory structure. Instead of just a subdirectory called 'conquest' containing files, plus a directory called 'data', with more files, there is subdirectory created called 'data', containing three additional directories - 'HEAD_EXP_00097038', 'dbase', and 'printer_files' - none of which contain any actual files or data.


    The initial compile process has failures already noted in the PDF document (supplying a non-PDF html file or txt file could be helpful, at least of the 'Linux Only' portions, in a README or INSTALL format)


    The DOS maktotal.bat file contains old information - it implies that the files need to be compiled under Microsoft, then can be copied to a Linux box and be recompiled.


    the maklinux script needs to be modified. Immediate suggested modifications are as follows.


    Rename script to maklinux.sh. File should then be 'chmodded' to +x or at least be run as /bin/sh maklinux.sh
    -------------------
    #!/bin/sh


    # This script requires that the user either be part of the 'sudoers' file without password, or be su'ed to root.
    # '/usr/lib/cgi-bin' should be changed to your intended cgi-bin directory for Apache. In the case of Slackware, it's /var/www/cgi-bin



    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG total.cxx -o dgate -lpthread
    pkill -9 dgate
    sleep 0.2s
    cp dicom.ini.dbase dicom.ini
    cp dicom.sql.dbase dicom.sql
    sudo cp dgate /usr/lib/cgi-bin/dgate.html
    sudo cp dgate /usr/lib/cgi-bin
    sudo cp dicom.sql /usr/lib/cgi-bin
    sudo cp dicom.ini /usr/lib/cgi-bin



    ------------------------



    Attempting to compile with MySQL support (-DUSEMYSQL) returns lots and lots of errors.


    Several things are happening.


    The first is that the odbci.cpp file has hard coded links to a windows version of mysql.h
    Second is that there's a declaration of mysql.h with no reference to the actual location of the file. - those can be corrected by hardcoding the reference (in Slackware, it's /usr/include/mysql/mysql.h)


    Last is that the actual compile string needs to be this (be sure you've initialized a mysql database first)


    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG -DUSEMYSQL total.cxx -o dgate -lpthread -L/usr/lib/mysql -lmysqlclient


    (-DUSEMYSQL seems strange when the PostGres declaration is -DPOSTGRES. Should the -DPOSTGRES be changed to -DUSEPOSTGRES to maintain a similar standard? )


    (This is a modification of my original post where I missed the 'no such file' error)


    Going to bed now - more work in the morning.

  • What I'll be working on is trying to determine what needs to be added/removed in dicom.ini to make MySQL interfacing work. PostGres has a variable that is boolean (0/1), but is there a MySQL variable as well that's always 0 unless it's set for 1?


    BW

  • maklinux_mysql.sh -


    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG -DUSEMYSQL total.cxx -o dgate -lpthread -L/usr/lib/mysql -lmysqlclient
    pkill -9 dgate
    sleep 0.2s
    cp dicom.ini.postgres dicom.ini
    cp dicom.sql.postgres dicom.sql
    sudo cp dgate /var/www/cgi-bin/dgate.html
    sudo cp dgate /var/www/cgi-bin
    sudo cp dicom.sql /var/www/cgi-bin
    sudo cp dicom.ini /var/www/cgi-bin
    sudo /sbin/ldconfig /usr/lib/mysql


    ---------
    Note: this is Slackware specific. Should have a query that asks the path of the web server.


    --------


    dicom.ini (so far) for MySQL
    (This doesn't include DoublebackslashToDB = 1 - that looks to be a windows requirement. - MagDevice0 would probably need to be modified to go to something like /dev/sdg0, if it's a direct to tape link)
    --------
    # This file contains configuration information for the DICOM server
    # Example Linux version using MySQL user conquest, pw conquest,
    # database conquest_mysql
    # Copy this file to dicom.ini to use it



    [sscscp]
    MicroPACS = sscscp
    Edition = Personal


    # Network configuration: server name and TCP/IP port#
    MyACRNema = CONQUESTSRV1
    TCPPort = 5678


    # Reference to other files: known dicom servers; database layout; sops
    ACRNemaMap = acrnema.map
    kFactorFile = dicom.sql
    SOPClassList = dgatesop.lst


    # Host, database, username and password for postgres server
    SQLHost = localhost
    SQLServer = conquest_mysql # SQL Database NAME
    Username = conquest # SQL Database User
    Password = conquest # SQL Database Password
    MySQL = 1


    # Configure database (dbase parameters blocked out)
    TruncateFieldNames = 10
    MaxFieldLength = 254
    FileNameSyntax = 3
    MaxFileNameLength = 255
    FixPhilips = 0
    FixKodak = 0
    DoubleBackSlashToDB = 1
    UIDPrefix = 9999.9999
    EnableReadAheadThread = 1
    PatientQuerySortOrder =
    StudyQuerySortOrder =
    SeriesQuerySortOrder =
    ImageQuerySortOrder =
    # IndexDBF = 1
    # PackDBF = 0
    # LongQueryDBF = 1000
    TCPIPTimeOut = 300
    FailHoldOff = 60
    RetryDelay = 100
    QueueSize = 128
    WorkListMode = 0


    # Configuration of compression for incoming images and archival
    DroppedFileCompression = un
    IncomingCompression = un
    ArchiveCompression = as


    # Names of the database tables
    PatientTableName = DICOMPatients
    StudyTableName = DICOMStudies
    SeriesTableName = DICOMSeries
    ImageTableName = DICOMImages
    DMarkTableName = DICOMAccessUpdates
    RegisteredMOPDeviceTable = RegisteredMOPIDs
    UIDToMOPIDTable = UIDToMOPID
    UIDToCDRIDTable = UIDToCDRID


    # Banner and host for debug information
    PACSName = CONQUESTSRV1
    OperatorConsole = 127.0.0.1


    # Configuration of disk(s) to store images
    MAGDeviceThreshhold = 0
    MAGDevices = 1
    MAGDevice0 = ./data/


    --------------------


    I haven't imported data yet - I need to see about setting up a VPN link to a customer site, and see if I can tickle two ConQuest servers - one DbaseIII, and one SQL - to transfer data between them.


    (running ./dgate -^serverstatus.log returns
    ***Unable to open database conquest_mysql as user conquest on localhost
    - the database does exist and is accessible - suggestions?)


    BW

  • The hashes were added just for that posting - I don't have them in my dicom.ini file.


    Doing some further abuse, I found that I am getting an "Error Connecting to SQL" message. (./dgate -r )


    It also has a Regen Device 'MAG0' before the error


    I'm assuming that has to do with the line


    MAGDevice0 = ./data/


    in dicom.ini


    I didn't modify odbci.cpp at all - I didn't realize there might be a need to. I modified odbci.hpp, but only to change the two references to mysql.h to the actual location of the mysql.h file.


    Apparently much of this goes back to the failure of dgate to actually log into the MySQL database. I can't get a good traceback, as the --debuglog_on option apparently doesn't work (at least, not before it's trashed itself)


    Interestingly enough, the 'dgate.html' link in cgi-bin brings up some query fields. It's not doing much, mainly because the database hasn't been initialized with tables.

  • Hi BookWorm,


    I am suprised that the hard path was a problem - that is only there for WIN32. Please mail me the changed file. Are you using 1.4.12 and mysql 5.0.22? The connect code is in odbci.cpp, have a look there.



    Marcel

  • I'll work on it some more tonight - it's been a busy weekend.


    Not sure that the hard path WAS a problem - I took it out to make certain. the 'mysql.h' definitely was a problem, as it doesn't seem to actually look for where mysql.h is located in the machine - if mysql.h isn't in the path, it won't be found with that standard include statement - you have to put a full path in the file.


    Troy
    aka
    Bookworm

  • Quote from marcelvanherk

    Probably edting odbci.hpp is enough. Did you create an empty database.
    The cgi interface is independent of that database. It will not work though before the server is up.


    There is an empty database, with the correct username/password as are in the dicom.ini file. Apparently the issue is with authentication between dgate and the mysql database. I may try it with no password at all, or a database with no underscore in the name. (or just a shorter name)


    What email address? (or should I PM you for the address?)


    BW

  • (This is a windows attempt - edit)


    Note: Installed MySQL 5.0.27, with mysqlcc-0.96, and odbc connector 3.51.


    Attempted to follow directions in PDF file (copied libmysql.dll from the MySQL directory to the dicomserver directory), and selected native mysql support.


    Receiving the following error -


    "There was a problem loading library libmysql.dll - mysql not functional"


    Deleted out libmysql.dll - currently trying it as 'use SQL server' and setting ODBC configuration.


    Note: ConquestPACS.pdf is only packaged as part of the linux configuration (mind you, it might be a standalone on the site), it's not included in any of the windows zip files that I can find, so far.


    Is it possible to get a copy of the original document from which the PDF was created? If so, I can add additional information to a copy for myself (and then to be uploaded, of course)


    BW

  • For NATIVE mysql support (ODBC not used):


    WINDOWS: You need to use the mysql client dll of 5.022 (that what's dgate and the GUI are compiled against) even if you are using a newer mysql server . I wanted to redistribute the file but got no clear reply from the MySql representative that it was allowed. The PDF is in dicomserver1412.zip


    LINUX: your attempts look good - only I think DoubleBackslashtoDB should be 1 (minor issue). Don't know what is the problem opening the database. Any clue in the compile time messages?


    Marcel

  • Downloading the dll file right now.


    As for redistributing, there should be a notation somewhere in the copyleft about redistribution. As long as you provide a link to the _entire_ version (which is in their archive), and include the copyleft in a zip file with the .dll, I don't think anyone would have a problem.


    Doublebackslashtodb - I'll try setting it to see what happens. No compile time problems, database(s) are both accessible - just the 'can't connect' message.


    Would access to the server in question help?

  • Okay - switching libmysql.dll files out did the trick for 'native mysql support'.


    So, what has to be done for the ODBC mysql support? I'll re-read the documentation and see if there's something I missed.


    What I am seeing in some of the documentation is that steps are being skipped - it's the same issue I have when writing documentation; unless I do the process while I write the documentation, I miss 'obvious' steps.


    Off to start my day.


    BW

  • I just went through and re-read the COPYING copyleft agreement that's included in that version of MySQL - as long as they can _get_ the source, and you tell them how, you should have no problem redistributing the .dll file.


    My suggestion is that you take the DLL, a file containing the information on where that DLL came from, and that it has not been modified from the original source, plus the link to the page - http://downloads.mysql.com/archives.php?p=mysql-5.0&v=5.0.22 - and the COPYING file with. Then you'll have a zip file with three files inside of it - the dll, the information/README file, and the COPYING file. Have that as a separate download.


    ----------------


    MySQL version on linux is 5.0.24a (I don't know if it makes a difference for the failure to authenticate in dgate)

  • Hi,


    can you give me help to get mysql running as easy as possible on debian. Then I can try help you out. As far as ODBC with MySql goes I only have the very old doc by Paolo Marchesi (appendix 2?). I prefer to skip odbc as far as possible. I will make the mysql download as suggested.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!