How to set env DCMDICTPATH to access it from everywhere

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
moxtrip
Posts: 3
Joined: Wed, 2018-08-08, 10:16

How to set env DCMDICTPATH to access it from everywhere

#1 Post by moxtrip »

Hi there, I have a VPS server running with DCMTK last version installed, the server as it is, is working fine, listening on port 6000, but I'm trying to implement an AJAX request to make an ECHOSCU to the server so I know if it ON or OFF, on localhost (development) It's working so cool, no errors, no bugs, but in production, it keeps saying DCMDICTPATH must be set (even though the server is running), and the variable is actually set on "etc/environment" with 3 different path options.
Image

IMAGE: http://prntscr.com/kkifc9

Can you help me out please, we are stuck right there!

Thanks!

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: How to set env DCMDICTPATH to access it from everywhere

#2 Post by Michael Onken »

Hi,

It seems the server does not see the DCMDICTPATH setting of your console. Maybe it runs as a different user? You could print the variable from the server in order to make sure it actually "sees" your setting.

As an alternative approach, and if viable for your project, you could also make DCMTK use the builtin dictionary if you enable it in CMake during build. That way you do not need to set DCMDICTPATH at all.

Best,
Michael

moxtrip
Posts: 3
Joined: Wed, 2018-08-08, 10:16

Re: How to set env DCMDICTPATH to access it from everywhere

#3 Post by moxtrip »

Michael Onken wrote:Hi,

It seems the server does not see the DCMDICTPATH setting of your console. Maybe it runs as a different user? You could print the variable from the server in order to make sure it actually "sees" your setting.

As an alternative approach, and if viable for your project, you could also make DCMTK use the builtin dictionary if you enable it in CMake during build. That way you do not need to set DCMDICTPATH at all.

Best,
Michael
That's what i was thinking, i saw it on the documentation but i can't find (or I dont see it) the flag or command to actually recompile and build in the dictionary, we actually got it to work, using "putenv()" function on PHP, so we set the variable on the public environment for the current script or call, it gets the job done.

Now we are getting a new error (how cool right?)
I: Association Rejected: Bad Application Context Name:
D: 0006:0303 DUL Finite State Machine Error: No action defined, state 1 event 7
It seems our echo is not sending any kind of UID and it's getting rejected by the server.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: How to set env DCMDICTPATH to access it from everywhere

#4 Post by Michael Onken »

The CMake variable is called DCMTK_ENABLE_BUILTIN_DICTIONARY. Once you executed the "Configure" step it shows up.

Regarding the new error: This means that someone is connecting to you with a protocol not being DICOM. This could either mean that someone really uses an OSI protocol other than DICOM (by setting a different Application Context Name, i.e. protocol name) during OSI connection setup, or, which is more likely, someone is trying to connect with a totally different protocol and the message is a bit misleading.

Best,
Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest