PostgreSQL Plugin error Windows

Hi,
I am trying orthanc with PostgreSQL in windows and i cannot ot make it work. I’ve put the configuration just like the orthanc-book example but still not working.

My log file ends with this:

0405 02:41:53.335696 PluginsManager.cpp:269] Registering plugin ‘dicom-web’ (version 0.4)

W0405 02:41:53.335696 PluginsManager.cpp:168] URI to the DICOMweb REST API: /dicom-web/

W0405 02:41:53.336697 PluginsManager.cpp:168] URI to the WADO-URI API: /wado

E0405 02:41:53.337790 SharedLibrary.cpp:65] LoadLibrary(Configuration../Plugins\OrthancPostgreSQL-2.0-Index.dll) failed: Error 193

W0405 02:41:53.337790 PluginsManager.cpp:219] Unregistering plugin ‘dicom-web’ (version 0.4)

W0405 02:41:53.342235 PluginsManager.cpp:219] Unregistering plugin ‘worklists’ (version 1.3.1)

W0405 02:41:53.342235 PluginsManager.cpp:168] Sample worklist plugin is finalizing

E0405 02:41:53.342235 main.cpp:1323] Uncaught exception, stopping now: [Error while using a shared library (plugin)] (code 25)

W0405 02:41:53.342235 main.cpp:1356] Orthanc has stopped

The plugins i’m using are the ones here (2.0): https://www.orthanc-server.com/browse.php?path=/plugin-postgresql

Database created with orthanc as name, same as user. the postgresql.json is this (in case I don’t see the mistake):

{
/**

  • Configuration to use PostgreSQL instead of the default SQLite
  • back-end of Orthanc. You will have to install the
  • “orthanc-postgresql” package to take advantage of this feature.
    **/
    “PostgreSQL” : {
    // Enable the use of PostgreSQL to store the Orthanc index?
    “EnableIndex” : true,

// Enable the use of PostgreSQL to store the DICOM files?
“EnableStorage” : true,

// Option 1: Specify explicit authentication parameters
“Host” : “localhost”,
“Port” : 5432,
“Database” : “orthanc”,
“Username” : “orthanc”,
“Password” : “orthanc”,

// Option 2: Authenticate using PostgreSQL connection URI
// “ConnectionUri” : “postgresql://orthanc_user:my_password@localhost:5432/orthanc_db”,

// Optional: Disable the locking of the PostgreSQL database
“Lock” : false
}

}

PostgreSQL server version is 10.3-1 64 bits, orthanc 1.3.1, SO windows 10 64 bits. Any help will be appreciated. Don’t doubt asking for more info.

I would recommend downloading the Orthanc Windows installer, it as the plugins built in already, looks like your is failing to load OrthancPostgreSQL-2.0-Index.dll
A few people have had trouble downloading the plugins and using them directly, mostly due to Win32/64 mismatch. I would recommend copying configs, removing and installing this, then putting configs back, it is pretty painless: https://www.orthanc-server.com/download-windows.php

I’ve used the windows installer, but it didn’t create the postgresql dll. Searching a bit on the net, seems to be the 32/64bit mismatch (error 193), if it is, dll are 32bits. Tried to compile the sources of postgresql plugin on my pc, but i didn’t suceed.
I’ll try to install win64 source and hope for the best.
Also, if there is someone with postgresql dll compiled in 64 bits, i would be so grateful if he or she could send it to me.

Wierd, it should have given you the option during the install with it defaulted to install the two dll’s, OrthancPostgreSQLIndex.dll and OrthancPostgreSQLStorage.dll.
No matter, you should see them in your e-mail.

Ok, reinstalling it, it generated the dll (idk what i did the first time). The problem is there still.

And they are named the same as I posted above? Did the ones I send Work at all?

OK, looks like i find the problem (looks like i’m blind). Your advice about the name make me notice i had 2 dll of each postgresql, index and storage, but didn’t notice.
When i remove the “*-2.0.dll” (the ones i download precompiled) and copy in plugins directory, seems like it is working, i am indexing some dcm files and checking the database.

Thanks for your help, i appreciate it so much :).

Perfect, great to hear!