Announcement

#1 2019-01-13 02:56:52

spiked
Member
2019-01-13
2

Synology NAS Install - "Cannot connect to server"

Hello/Hi/Greetings,

Trying to get Piwigo working on my Synology NAS DS218plus.

Piwigo files have been placed in a folder in my NAS web server directory (note the web server and MariaDB are currently working fine with a Webtrees installation), and file permissions set for all the folders and descendants. Created database using phpMyAdmin in MariaDB, and created a new database user and password, with all privileges.

When I run the setup by invoking the URL, I get the setup page. I enter localhost, the new db user name and password, the database name, and the default folder prefix ('piwigo_').

In response I get 'Cannot connect to server'.

Any idea what I'm doing wrong? I see others in the forums have had similar problems, but see no forum replies which have given any solutions. I also see some here and around the web who claim to have successfully installed Piwigo on a Synology NAS, and have it working.

If any of those who got it working are reading this, was there any special config necessary to do so? Am I overlooking something?

Thanks for any help!

Neil

Piwigo version: 2.9.4
PHP version: 7.0.30
MySQL version: MariaDB 10.3.7
Piwigo URL: http://

Offline

 

#2 2019-01-14 05:35:16

spiked
Member
2019-01-13
2

Re: Synology NAS Install - "Cannot connect to server"

I managed to get both Piwigo and Zenphoto to work on my Synology NAS. It was a database socket issue.

To fix, from the Synology DSM webpage:

Open Web Station config.

PHP settings

For each PHP version/profile you have installed, select it, click Edit, then select the Core tab. Search on 'socket'. Select mysql.default_socket and enter this value, without the quotes: '/run/mysqld/mysqld10.sock'. Do the same for mysqli.default_socket if present.

Both Piwigo and Zenphoto were able to access their databases after making this change.

Enjoy!

Neil

Offline

 

#3 2019-01-15 09:41:54

bsdll
Member
2019-01-15
2

Re: Synology NAS Install - "Cannot connect to server"

Just adding this in for future reference for anyone else trying to set piwigo up on a Synology NAS.

I didn't do the step you mentioned, you just have to reference the port in the server name:

127.0.0.1:3307

Since it's MariaDB not MySQL it's a different port.

Offline

 

#4 2020-01-24 20:41:40

Rust
Member
2020-01-24
28

Re: Synology NAS Install - "Cannot connect to server"

I went through both of these methods without success.
But got there eventually.

I'm running a two bay Synology DS218j, with WebStation and a Wordpress package set up. I tried the installation, using localhost as the server, and root as the user. It generated a couple of cannot connect errors: no such file and couldn't fetch mysqli.

I changed the .sock values as suggested by @spiked, which addressed the initial error messages, but produced another: connection to server successful but the connection to the database was not possible.

I then tried @bsdII's port suggestion, which reverted to a cannot connect error. So I went back to localhost, and using phpMyAdmin, created a piwigo database with no tables.

That combination nearly succeeded. I got a Mailer creation error, and a failure to create database.inc.php error. But because the Piwigo documentation is very thorough, the error message told me what I needed to do in creating the database access file.

Once I had moved the config file into the Synology directory, I was able to log in and continue as needed. Woo hoo! Now I can get on with trying to wrangle all the other things that don't automate when hosting on a NAS, like updates, plugins, and so on... :/

Summary: a combination of _this_ forum thread and the Piwigo error message documentation made it happen.

First time forum user... just adding keywords/tags in case they make it easier for others. #NAS #Synology #self-hosting #database_connection

Last edited by Rust (2020-01-24 21:00:19)

Offline

 

#5 2021-02-19 10:17:41

Hurban1983
Member
2021-02-19
4

Re: Synology NAS Install - "Cannot connect to server"

Hi!

I am considering recommending a Synology NAS for a volunteer organization who already have made an extensive photoarchive in Piwigo. Unfortunately their server has been down for some time now, and I want to see if it is possible to move the whole thing to a Synology NAS with the established folder- and organizational structure which they have used a lot of time on making?

Is it possible to maintain the established structure in a transfer to Synology NAS?

Best wishes,
Hans Petter, Norway

#NAS #Synology

Last edited by Hurban1983 (2021-02-19 10:18:32)

Offline

 

#6 2021-02-19 12:12:35

erAck
Only trying to help
2015-09-06
2025

Re: Synology NAS Install - "Cannot connect to server"

If the database is intact and available (or rather a dump of it) then yes. If not, and physical synced folders were used then albums can be recreated from the directory structure and content on disk. If virtual albums were used then images are available but all album structure is lost without the database.


Running Piwigo at https://erack.net/gallery/

Online

 

#7 2021-02-19 12:25:59

Rust
Member
2020-01-24
28

Re: Synology NAS Install - "Cannot connect to server"

Hi Hurban,

Looks like erACK's reply answers your question about directory structure. So I'm going to add a bit about server function. I never got the Synology to run flawlessly as a web server. I've stopped using my Synology as a photo store, in favour of an Asustor 6302T. Piwigo web access on the Asustor is easier to configure. They seem to have put more effort into user-friendly ways of running a NAS as a server. Aside from that the two are quite similar.

Offline

 

#8 2021-02-19 13:34:36

Hurban1983
Member
2021-02-19
4

Re: Synology NAS Install - "Cannot connect to server"

Thanks @erAck and @Rust!

I currently don't know the state of the database, but it is really useful for us to have this information before we make any decisions!

I see that Asustor has a Piwigo App in their AppCentral, so perhaps this will make the installation easier?

https://www.asustor.com/en/app_central/ … amp;model=

Offline

 

#9 2021-02-19 13:50:00

Rust
Member
2020-01-24
28

Re: Synology NAS Install - "Cannot connect to server"

Yes! :)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact