Test wado with a small web server able to run cgi

  • Hi, I installed 1419d with default settings.

    I have configured dicom.ini correctly following the docs.


    And , I installed tinyweb(https://www.ritlabs.com/en/products/tinyweb/install.php) to test wado.

    As second option, I also used an Intraweb app made in delphi with a code to run cgi.

    For both I copied cgi-bin folder into wwwroot.



    I can confirm with dgate is executed.

    The problem is that nothing is returning from dgate.

    I have used 1419d1 version of cgi-script in cgi-bin folder and I tested also with newweb folder.

    Both is returning nothing to browser.


    Some help will be appreciated.


    Regards,

    Luiz

  • Hi Luiz,


    Seems like a nice small server. I tried this:


    http://localhost:280/cgi-bin/newweb/dgate.exe?mode=start


    Which indeed returns

    CGI script /cgi-bin/newweb/dgate.exe returned nothing

    However, if I do this, dgate.exe returns if called correctly:

    It looks like tinyweb does not set QUERY_STRING. Can you check this with the developers?


    Marcel

  • Hi, Marcel,

    I am comming back to this post to ask about CGI.

    I am using delphi with INTRAWEB (IW)as back end.

    I have a problem with a intraweb cgi runner module doesn´t returning nothing from dgate.exe.

    So, I create my owner CGI runner and It works well, if I set the working directory to child process created for my CGI runner executing dgate.exe.

    If I don´t set the current work directory in "CreateProcess" function, dgate is unable to find and execute the lua scripts.


    I have asked the IW author to modify IW module to allow set the working dir, but he said me that current working directory should be done by dgate.exe.


    I ask you if dgate.exe is setting the current working directory or I am making some error.


    Here is the thread that I open in IW forum: https://www.atozed.com/forums/thread-1224-page-3.html


    Regards, Luiz

  • Hi,


    dgate indeed assumes it is run from a given working directory. In CGI mode it must be able to at least access the proper dicom.ini, dgate.dic, and the lua files. In non-cgi mode there is a -w parameter to set the working directory but that does not work for CGI.


    I guess I can try to first add the code that at least locates dicom.ini next to dgate.exe in CGI mode; the rest of the paths could be set from there. I would add it in the git version. Next we could try to set lua's package.path and package.cpath as well as the local environment PATH.


    Marcel

  • Hi Marcel.

    In delphi (object pascal) I have used the next code to run dgate in cgi-mode. Note the createprocess function where I set the working directory.

    If I don´t do that, dgate don´t work because it can't find others files such as .ini, .lua ........


    If I use the IW cgi runner, It don´t set the working directory and dgate.exe doesn´t work.


Participate now!

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