# Installation & Configuration

## Installation Notes

\---

## Installation Steps

### 1. Download and Install "*Microsoft Visual C++ 2015 Redistributable Package (x64)*" if not already installed. If you have already, skip this step.

Sodium is developed with C language. This package is needed to run C application.

{% embed url="<https://www.youtube.com/watch?v=XET46fgTp5g>" %}

{% embed url="<https://www.microsoft.com/en-us/download/details.aspx?id=48145>" %}

### 2.  Download Sodium package

Download package is nightly built versions of Sodium. Do not try it on live/production database and web servers.

Please report errors/problems you encounter to the following contact points:

Developer E-Mail: [muradkarakas@gmail.com](https://muradkarakas.github.io/Sodium-Manual/download_page.html)&#x20;

LinkedIn Profile Page: <http://tr.linkedin.com/in/muradkarakas>

{% embed url="<https://github.com/muradkarakas/Sodium-Setup>" %}

Youtube playlist for installation (2 videos)

{% embed url="<https://www.youtube.com/playlist?list=PLMDu6aYdBVG3LmDAnX1FDYFyS9F3qkeEV>" %}

### 3. [If you are a developer, follow the instruction on Development page](https://muradkarakas.gitbook.io/sodium_documentation/development/ide)

## Prerequisites

| **Category**           | **Software**                                                                       | **Tested on**                                                                                                                                                                                              |
| ---------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Operation System       | MS Windows 64 Bit                                                                  | <p>Windows Server 2012 64Bit</p><p>Windows 10 64Bit</p><p>Windows 7 Professional 64Bit</p>                                                                                                                 |
| Database Server        | <p>Oracle</p><p>PostgreSQL</p><p>MySql</p><p><strong>(See Note No.1)</strong></p>  | <p>Oracle Database 18.4 Express Edition 64 Bit</p><p>PostgreSQL-12.2.1</p><p>MySql</p>                                                                                                                     |
| Internet Browser       | <p>Mozilla Firefox</p><p>Google Chrome</p><p>Microsoft Internet Explorer Opera</p> | Latest Versions                                                                                                                                                                                            |
| System Resource (Port) | ​                                                                                  | <p>Installation script installs Sodium on port 8089 by default.</p><p>If this port is used by another application, please find and open StartSodiumServer.bat file, modify port parameter and save it.</p> |

{% hint style="info" %}

1. **For ORACLE:**\
   Check the path of the "oci.dll" file is exists in the system environment variable `PATH`. If not, please add.\
   Setting character encoding to UTF8 on the web server is required for Oracle. Otherwise, characters read from database cannot be seen as expected on the client browser. Please set character encoding part of the NLS\_LANG value to UTF8 on web server. (Ex: TURKISH\_TURKEY.UTF8).\
   &#x20;**For POSTGRESQL:**\
   Check the path of the "libpq.dll" file is exists in the system environment variable `PATH`. If not, please add.&#x20;

   **For MySql:**

   Check the path of the "libmysql.dll" file is exists in the system environment variable `PATH`. If not, please add.

   Check the "bin" folder in the MySql installation directory is exists in the system environment variable `PATH`. If not, please add.
2. Do not use space character in installation path. Use only ANSI characters in installation path.
   {% endhint %}

## Troubleshooting

#### If you see that dialog window below when you start `SodiumServer.exe`, click "Yes" since Sodium requires Administrator privilege.

![](https://1666013677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2ds-WBcneenLnDVHbz%2F-M7K1x5zGhn9yXFv2Yg0%2F-M7K5mJi_cS2wH2Py0Yx%2Fimage.png?alt=media\&token=052c4232-af4a-4115-9514-bd0203d3dd09)

#### If you need to change port number, find and open "StartSodiumServer.bat" file, find the `http://*:8089/` text and modify the number.

#### If you get `"HttpAddUrl failed with 183"` message after you run `SodiumServer.exe`, this means the port number Sodium uses is already in use by another application or another copy of SodiumServer.exe. You can modify the content of "StartSodiumServer.bat" file to change Sodium port number.&#x20;

![](https://1666013677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2ds-WBcneenLnDVHbz%2F-M7KAON_H2gZ2x97MnJt%2F-M7KB2vDJ2xftcBr5Vil%2Fimage.png?alt=media\&token=ff8fe334-ec99-4e49-9324-7ca28606f921)

#### If you get "SodiiumServer.exe \<Url1> \[Url2] ..." message after you run SodiumServer.exe, this means that you do not provide required command line parameters. Please have a look at the original "StartSodiumServer.bat" file content to learn usage of SodiumServer.exe. It is advised to run StartSodiumServer.bat file to run Sodium.

![](https://1666013677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M2ds-WBcneenLnDVHbz%2F-M7KAON_H2gZ2x97MnJt%2F-M7KCDSkQU7HENoIQ1z8%2Fimage.png?alt=media\&token=ce54c65f-cbb6-41b9-9ec3-25cb778585bd)

#### If `SodiumServer.exe` stop running, it may print out one of the well-known exit codes listed below;

* **Exit code 101:** `SodiumShared.dll` nor found or not accessible.

  **Possible Solutions:**

  * Add `SodiumShared.dll` file path to environment path.
  * Check file permission settings.
* **Exit code 102:** function is not found in `SodiumShared.dll`

  **Solution:** add `SodiumShared.dll` file path to environment path.
* **Exit code 103:** MySql C client library couldn't initialized. Possible reasons;

  * `libmysql.dll` is not found or not accessible
  * One of the functions required to run Sodium is not found in `libmysql.dll` file.
  * MySql client library version is not compatible.

  **Possible Solutions:**&#x20;

  * Add `libmysql.dll` file path to environment path.
  * Check file permission settings.
* **Exit code 104:** SqlServer C client library couldn't initialized.&#x20;
* **Exit code 105:** SodiumApp.dll couldn't loaded.
* **Exit code 106:** Function in SodiumApp.dll not found: ....
