Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-07-16 11:47:53

dspears
Member
Registered: 2020-07-15
Posts: 10

issues setting up textpattern on a synology nas drive

Hi,

I’m having trouble getting Textpattern to work on my Synology nas drive. Here’s what I’m using on the nas:
- Apache HTTP server 2.4
- phpAdmin
- MariaDB 10
- php 7.2

I’ve created a database in phpAdmin with a user (logged down the user name and password to use on the textpattern set up).

I get to the text ‘set database details’ on the textpattern setup and enter the details (MySQL user name, MySQL password, MySQL server, MySQL database) and I get the message ‘Cannot connect to database’.

I have noticed in the phpAdmin that the web server it’s running on nginx and not apache. Could that be the issue?

Previously I have had it running on the nas using php 5.6. But wanted to upgrade it to php 7.2.

Any help to resolve this would be appreciated.

Last edited by dspears (2020-07-16 11:48:22)

Offline

#2 2020-07-16 11:54:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: issues setting up textpattern on a synology nas drive

Hi, and welcome to the forum.

Before delving any deeper with diagnosing this, when you enter the database host on step 2 of setup, do you specify localhost or 127.0.0.1? I know for some of my servers, localhost doesn’t work but 127.0.0.1 does. I think it depends how the database/grants are set up. phpAdmin should reveal this.

I presume the database is on the same physical server as the filesystem and not inside some virtual container? Otherwise you’ll need the IP address of the database server there instead when you supply the host during the setup process.

EDIT: running Nginx/Apache shouldn’t be an issue. We support both now. Our demo servers all run Nginx.

Last edited by Bloke (2020-07-16 11:56:41)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-07-16 12:02:39

dspears
Member
Registered: 2020-07-15
Posts: 10

Re: issues setting up textpattern on a synology nas drive

Hey,

Thanks for getting intouch and the warm welcome.

I’m using localhost.

The text pattern is running in a virtual host via webstation on the synology drive.

The database is on the nas. Plus the login work.

I’m happy to re-install everything from fresh if helps?

I’ll try changing the database host to the ip you suggest and will report back.

Offline

#4 2020-07-16 12:14:39

dspears
Member
Registered: 2020-07-15
Posts: 10

Re: issues setting up textpattern on a synology nas drive

I’ve tried the ip address you suggested and it doesn’t work.

Offline

#5 2020-07-16 12:36:39

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,277
GitHub

Re: issues setting up textpattern on a synology nas drive

Throw a copy of Adminer in your webroot to confirm the database login actually works. It does a lot of what phpMyAdmin does, but in this case it’s not a baked-in package, so it’ll effectively work in a similar way to how Textpattern would insofar as it will take credentials and then try to connect with them.

Some basics to check – and take this in the spirit it’s intended – you’re definitely using the right credentials? Any weird characters in the password?

Nginx works just fine with Textpattern, bluntly if you’re able to run the setup then you’re pretty much sorted – the PHP stuff is working, it’s serving pages, you’re on the right path.

Offline

#6 2020-07-16 12:39:58

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,468
Website GitHub

Re: issues setting up textpattern on a synology nas drive

Hmm, okay, thanks for trying. It was a long shot.

Sounds like everything is co-located so it should in theory work. Unfortunately, the ‘cannot connect’ message is a generic message thrown when a connection issue occurs, and it doesn’t give us any specifics on why.

It fails if:

  • The IP address of the database server is incorrect. This is usually shown in phpMyAdmin somewhere (or as Pete says, Adminer).
  • The user name of the user is incorrect or doesn’t have permission to access the nominated database. Check your username has the full range of required permissions to the database.
  • The supplied password is incorrect.
  • (if using SSL sockets) The socket and port are incorrect (see Can’t connect to DigitalOcean managed databases for more on this feature).

So, quite a broad range of things that can trigger the error and, unfortunately, it’s a case of running down each one and verifying they’re correct.

Someone else may be able to suggest some other avenues to try. But I doubt reinstalling will make any difference so let’s reserve that for a last resort.

Last edited by Bloke (2020-07-16 12:41:27)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2020-07-16 12:59:21

dspears
Member
Registered: 2020-07-15
Posts: 10

Re: issues setting up textpattern on a synology nas drive

Hi Pete,

I’ve put a copy of Adminer on the nas and have tried that. It doesn’t work.

To make sure I was using it right I tried it on a mamp server on my laptop that has a textpattern install. It logged in and I could see all the tables in the database.

Offline

#8 2020-07-16 13:19:42

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,277
GitHub

Re: issues setting up textpattern on a synology nas drive

dspears wrote #324585:

I’ve put a copy of Adminer on the nas and have tried that. It doesn’t work.

Now we’re getting closer – the database won’t connect outside of Textpattern either, so the snag is with your database side of things. Could possibly be a listening issue – that is, MySQL (MariaDB in your case) listens on addresses and ports, and you might not have the secret sauce combo for it to work.

I am not familiar with Synology stuff, but there might be extra glue in the middle needed for a web app (Textpattern, Adminer, Wordpress, etc) to connect successfully. The listen address might not be 127.0.0.1localhost might be too broad or even map to another address…so, I would hunt down some examples of how to set up <popular web app> on Synology – with a caveat of avoiding the ones that are packaged as the whole thing is taken care of.

Flip the logic – spin up something from the package library that is a PHP app (e.g. Wordpress), confirm it’s working, then go poke around in the config file to extract the database connection details, check those with Adminer (i.e. does the packaged stuff behave similar to manual setup in the webroot), and see if that yields fruit.

Last edited by gaekwad (2020-07-16 13:20:05)

Offline

#9 2020-07-16 16:02:41

dspears
Member
Registered: 2020-07-15
Posts: 10

Re: issues setting up textpattern on a synology nas drive

So, I’ve got it sorted, with the help of a friend.

Basically in the web station app on the synology drive I’ve had to do the following update

- Go to PHP settings
- Select the PHP profile
- Click edit
- Go to the ‘Core’ tab
- Search for ‘Socket’
- There are 2 sections ‘mysqli.default_socket’ and ‘pdo_mysql.default_socket’. Both have a file path /run/mysqld/mysqld.sock it needs to be changed to /run/mysqld/mysqld10.sock

The MariaDB10 application does show the domain socket path.

Last edited by dspears (2020-07-16 16:03:54)

Offline

Board footer

Powered by FluxBB