Install TNG on a Synology NAS

Steve
Posts: 103
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by Steve »

I have not used special character sets. You might try TNG WIKI and Maria DB Setting Character Sets and Collations.

I have some meetings and projects for work to complete so my responses may be slow.

willifly
Posts: 7
Joined: Thu Aug 01, 2019 2:34 pm

Re: Install TNG on a Synology NAS

Post by willifly »

Ok, not a problem and found a solution to change the char-set by a mod to UTF-8. Here the link. Is not only related to my language. Is changing the TNG database to UTF-8. MariaDB no need to change.
Many thanks again for your help and time spendet on my problems.

https://tng.lythgoes.net/wiki/index.php ... g_to_UTF-8

Bob_C1955
Posts: 4
Joined: Sun Jun 21, 2020 4:23 am
Location: Market Rasen

Re: Install TNG on a Synology NAS

Post by Bob_C1955 »

Hi.
Thanks for hosting this Forum, Steve ...
As a TNG-returner I'm trying to install the latest version of TNG on a DS216+II, I previously had a hosted version of TNG7, so this is a learning process for me; I'm not indending to run other web services. DB is on MariaDB 10.
Following the guide, I have get as far as finishing the TNG Install, Item 4. Changing folder names. I get the following report:

"There was a problem returning data from the server. This may be temporary, so please try again later. Here is some information about the status of this request:

readyState:4
status: 500
headers: cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
connection: keep-alive
content-length: 0
content-type: text/html; charset=UTF-8
date: Sun, 21 Jun 2020 11:01:10 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
keep-alive: timeout=20
pragma: no-cache
server: nginx"


Web Station HTTP server is Apache 2.4 and PHP is v5.6. (so not nglnx)
OS is Windows 10 Home v1909
Any clues as to what could be wrong, and how to remedy, gratefully received.

Steve
Posts: 103
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by Steve »

TNG version 12.3 will not run on php 5.6. While Synology requires php 5.6 for some applications, it is no longer supported. (The recent upgrade for DSM no longer requires php 5.6) You can install multiple versions of php and select which version web station loads. Install php 7.2 or 7.3 and let me know if that corrects the issue. If you are not familiar with this process, here are some instructions.
Last edited by Steve on Mon Jun 29, 2020 7:53 am, edited 1 time in total.
Reason: add php 5.6 info

Bob_C1955
Posts: 4
Joined: Sun Jun 21, 2020 4:23 am
Location: Market Rasen

Re: Install TNG on a Synology NAS

Post by Bob_C1955 »

Thanks for the information regarding TNG12.3, and PHP revison. I have followed the instructions in the link, installing PHP 7.3, and setup in Web Station, and gone back to the TNG Install. I can now rename the folder defaults in Section 4.

Having saved the language and character set (English (UTF-8), I have advanced to Section 6. Establishing a connection to Database (MariaDB 10 in this case).
Although I have the necessary information for the Database, 'Save and Verify' produces a failure warning. So there appears to be another gotcha (-sigh-).

Steve
Posts: 103
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by Steve »

The way TNG connects to the MariaDB database is straight forward on a Synology. You only need to populate $database_host, $database_name, $database_username and $database_password. The remaining items $database_port and $database_socket are not needed for TNG.

Synology has two DB ports available depending on how your NAS is set up:
If Maria DB10 is using the default port 3306 use $database_host = "localhost";
If Maria DB10 is using the alternate port use $database_host = "localhost:3307";

You can check the settings by logging in to DSM, select the menu at the top left and launch Maria DB. The screen below will appear which gives the port and socket information. Make sure the Enable TCP/IP connection box is checked.

Image

Ensure there are no typos in the TNG database connection section and you should be able to connect.

Bob_C1955
Posts: 4
Joined: Sun Jun 21, 2020 4:23 am
Location: Market Rasen

Re: Install TNG on a Synology NAS

Post by Bob_C1955 »

Thanks Steve ...
Using the FH6 tool>Plugin> 'Export Gedcom file', I produced an export file using the 'Monroe' sample project.
Now in TNG admin - The admin user I created in set-up isn't there, nor the tree name. Importing GEDCOM produces 0.

I created an admin user and tree in TNG, but same result. Zero records created. I'm out of ideas as to what is wrong (-now). What should I look at, or redo, please?

Steve
Posts: 103
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by Steve »

This is an issue I've never seen. For imports you should use the GEDCOM standard 5.5 format. I've imported GEDCOM files into TNG well over 500 times, over the years, and never had a problem like you describe. Imports have nothing to do with TNG users as user information is stored in the tng_users table. Imports add information to the following tables:
tng_addresses, tng_branches (If used), tng_branchlinks, tng_children, tng_citations, tng_events, tng_eventtypes, tng_families, tng_notelinks, tng_people, tng_places, tng_repositories, tng_sources, tng_trees, tng_xnotes.

When you setup TNG, the first user entered is automatically assigned admin privileges. You cannot login to TNG unless the user exists and you cannot access the admin menus without admin privileges.

If you did not delete the user account the only alternatives that can cause this, is a corrupted database or, using phpMyAdmin, incorrectly editing items in the database. In either case once the database is messed up it may be easier to start over. To start over, log into phpMyAdmin and select the User Accounts tab. Locate the TNG user name and check the box next to that name. Under the "Remove selected user accounts" check the box next to "Drop the databases that have the same names as the users". Double check to ensure you are deleting the correct account, then select the go button. This will completely remove the user and the database that uses the same name. If you gave the database a different name than the user, you will need to delete (Drop) the database manually.

To start the process over with TNG you can reinstall it or use an editor that does not add a BOM (Byte Order Mark) like Komodo IDE or NotePad++. Open config.php located in the tng folder and remove the entries for connecting to the database.
$database_name = "";
$database_username = "";
$database_password = '';

Then scroll to about line 210 (near the end of the file) and change $tng_notinstalled = ""; TO $tng_notinstalled = "1";

Bob_C1955
Posts: 4
Joined: Sun Jun 21, 2020 4:23 am
Location: Market Rasen

Re: Install TNG on a Synology NAS

Post by Bob_C1955 »

Thanks to your help Steve, I have now got the GEDCOM records imported into TNG.
What was the problem? Well, I think I had two .. the Database and user 'mytree', where not connected; I had missed that necessary ' - database mytree' part.
Secondly, I had a TNG folder/files permission problem. After I worked through the inherited permissions again in DSM, things started to work across the HTTP connection.
I think the benefits of the way TNG works are great and that's why I invested again in TNG (have you seen a large cousins relationship chart - very impressive) so I knew I wanted to persevere and get this working - I can now look at the finer aspects of the record set, and prepare to import my 28k+ individuals, and the supporting information.
Thanks again for the Forum and all your help.

Steve
Posts: 103
Joined: Sun Oct 01, 2017 3:08 pm

Re: Install TNG on a Synology NAS

Post by Steve »

Glad you solved the issues! For a time I manually set permissions on a Synology NAS. Then I found you can use File Station to unzip files and no long set permissions manually. If you are placing TNG a sub-folder, create the folder using File Station. Then copy or move the zip to the NAS folder where you want to extract the file. Open file station, locate the zip file and right click on it. Select Extract here and File Station sets the permissions automatically.

I have not seen the large cousins relationship chart.
Last edited by Steve on Mon Jun 29, 2020 7:44 am, edited 1 time in total.