PHP based web server user validation

  • I played around with user validation for conquest web server and came with the following solution:


    The entire web interface is rerouted through dgate.php, which calls e.g. c:\dicomserver\webserver\cgi-bin\newweb\dgate.exe


    The web interface at e.g. c:\xampp\cgi-bin can be removed!


    dgate.php calls singlefilelogin.php that is a modified version of https://github.com/panique/php-login-one-file/


    The initial admin password is read from e.g.

    c:\dicomserver\webserver\cgi-bin\newweb\dicom.ini



    dgate.php overlays a username top right (where you can logout) and 'register new account' bottom left, the latter only for user admin:



    The end result is a fairly neat login system. It does require using https: to be safe. Creating certificates for https for an internal network is another story!


    Some changes are required in newweb, in particular start.lua has been augmented to allow uploading (dicom) files.


    Complete script code is on github, no changes required to the executable:


    https://github.com/marcelvanherk/Conquest-DICOM-Server


    A known issue is that uploading data does not work yet under linux with this interface.


    Please give it a try, any comments are welcome as always.


    Marcel

    Marcel van Herk is developer of the Conquest DICOM server together with Lambert Zijp.

    Edited 4 times, last by marcelvanherk: typo in dgate.php; removed link to commit as is released; known issue ().

  • Hi, Marcel
    I have a problem with upload dicom files under windows with web interface.

    Could you pls suggest what settings should be checked?


    This is my current C:\xampp\cgi-bin\dicom.ini


    [sscscp]

    MicroPACS = sscscp


    Tempdir = c:\temp


    # database layout (copy dicom.sql to the web server script directory or point to the one in your dicom server directory)


    kFactorFile = d:\DS1\dicom.sql


    # gives access to the SQL server of the DICOM server

    # use of independent database is also allowed (depends on scripts used)


    #SQLServer = c:\dicomserver\data\dbase\conquest.db3

    #SQlite = 1


    # Host, database, username and password for database

    SQLHost = localhost

    SQLServer = conquest

    Username = root

    Password = ****

    MySql = 1

    DoubleBackSlashToDB = 1

    UseEscapeStringConstants = 0


    # gives access to all DICOM servers known in acrnema.map


    ACRNemaMap = acrnema.map

    Dictionary = dgate.dic


    # default IP address and port of DICOM server (may be non-local, web pages empty if wrong)


    WebServerFor = 127.0.0.1

    TCPPort = 104


    # AE title: only used if web client originates queries or moves


    MyACRNema = DS1


    # path to script engine: ocx will not download images if wrong - shows as black square with controls

    # for wamp: dgate.exe runs if it is put in C:\wamp\Apache2\cgi-bin


    WebScriptAddress = http://127.0.0.1/cgi-bin/dgate.exe


    # if set to 1 (default), the web user cannot edit databases and (in future) other things

    # webpush enables push of data to other servers


    WebReadonly = 0

    WebPush = 1


    # these settings control size of slice and series viewers, max size of transmitted dicom images

    # (0=original), compression for images sent to the activex (may be un,n1..4,j1,j2), the size of

    # the icons in the image list, the image type used for icons and slice display, and the dgate

    # mode containing the viewer (may be seriesviewer, seriesviewer2, noviewer, serversideviewer,

    # or aiviewer - java code of the latter not included with 1.4.14).

    # note: all items require at least one space left and right of the '=' !


    [webdefaults]

    size = 560

    dsize = 0

    compress = un

    iconsize = 48

    graphic = gif

    viewer = wadoseriesviewer

    studyviewer = studyweasis


    [wadoseriesviewer]

    source = viewers/wadoseriesviewer.lua


    # enter address (up to not including the ?) of the WADO server for each DICOM AE listed

    # the sample (for AE TESTWADOSRV) comes from the DICOM standard and is not valid

    # the default is the local conquest server (which could use virtualservers as WADO bridge)

    # These WADO entries are used in 'list .... on ....'


    [wadoservers]

    TESTWADOSRV = http://www.hospital-stmarco/radiology/wado.php


    # Here are scripted series viewers: ImageJA, dwv, flexviewer (=aiviewer), weasis

    # And one scripted study viewer: studyweasis


    [imagejaviewer]

    source = viewers\imagejaviewer.cq


    [dwv016]

    source = viewers\dwv016.lua


    [flexviewer]

    source = viewers\flexviewer.lua


    [weasis]

    source = viewers\LaunchWeasis.cq

    header = Content-Type: application/x-java-jnlp-file\


    [studyweasis]

    source = viewers\LaunchWeasisStudy.cq

    header = Content-Type: application/x-java-jnlp-file\


    [weasisseriesxml]

    source = viewers\weasisseriesxml.lua


    [weasisstudyxml]

    source = viewers\weasisstudyxml.lua


    # default

    [DefaultPage]

    source = *.lua

Participate now!

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