lua not working

  • Hi Marcel,


    I have a problem with Lua Script. I dont know why i can't to make this work. :(


    Am using ubuntu 14 x64 y apache 2.4.7.


    In my cgi-bin directory, this files exists:


      acrnema.map
      dgate
      dicom.ini
      dicom.sql
      sample.lua


    The apache conf file, have this


    Code
    ScriptAlias /cgi-bin/ /server/conquestdicom/webserver/cgi-bin/ <Directory "/server/conquestdicom/webserver/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted </Directory>


    Inside dicom.ini, i put this:


    Code
    [sample]source = sample.lua


    This is the url to navigate : http://192.168.1.22:8080/cgi-bin/dgate?mode=sample


    this is the contents of sample.lua


    HTML
    HTML('Content-type: text/html\n\n')print([[<!DOCTYPE html>]])print([[<html>]])print([[<head> <title>sample 1</title> <meta charset="UTF-8"/></head>]])print([[<body>]])b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname: ',a[0].PatientName);print('ACR: ', get_amap(0),[[</br>]])print([[</body>]])print([[</html>]])


    and when browsing the website, this is the source from the page



    in the command line i run this


    Code
    ./dgate --luastart:"dofile('webserver/cgi-bin/sample.lua')"


    and serverstatus.log show this



    i run this to


    Code
    ./dgate --dolua:"b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname:', a[0].PatientName);"


    and return


    Quote

    patientname: XXXXXXXX.


    apparently, some error occurs with cgi, since HTML code is shown truncated.


    what is i need to configure that LUA work correctly?


    help me, please..


    Regards,


    James.

Participate now!

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