phpBB Update on Synology fails due to MariaDB database error

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

Hi all,

I'm having the following problem:

My Synology DS216SE doesn't want to install phpBB after I updated MariaDB from version 5 to 10.
The problem here is that strangly phpBB seems to find my MariaDB 5 installation (which is not installed anymore) and wants to import data from it to MariaDB 10. This operation fails, of course.
1.PNG
2.PNG
3.PNG
4.PNG
5.PNG
6.PNG
My NAS has the following configuration:
phpBB version: 3.2.0-0122.
Synology DSM version: DSM 6.1.3-15152 Update 6
Processor: MARVELL Armada 370 88F6707
Processor rate: 800 MHz
User avatar
VeganFanatic
Registered User
Posts: 191
Joined: Mon Sep 08, 2008 8:27 pm
Location: Victoria, BC Canada
Contact:

Re: phpBB Update on Synology fails due to MariaDB database error

Post by VeganFanatic »

I suggest before a big update that you make a backup of the forum contents, just in case...
user1548221
Registered User
Posts: 53
Joined: Mon Apr 18, 2016 3:53 am

Re: phpBB Update on Synology fails due to MariaDB database error

Post by user1548221 »

Edited...
Last edited by user1548221 on Wed Dec 20, 2023 1:04 am, edited 1 time in total.
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

I suggest before a big update that you make a backup of the forum contents, just in case...
I've already done that.
Uninstall & reinstall both phpMyAdmin & MariaDB10.
This didn't work as well but I can try again...
user1548221
Registered User
Posts: 53
Joined: Mon Apr 18, 2016 3:53 am

Re: phpBB Update on Synology fails due to MariaDB database error

Post by user1548221 »

Edited...
Last edited by user1548221 on Wed Dec 20, 2023 1:03 am, edited 1 time in total.
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

After uninstalling both PhpMyAdmin & MariaDB remove any remaining MariaDB files left. You can use WinSCP to access your DiskStation using SCP file protocol (make sure to temporarily enable telnet & SSH services first) & remove those MariaDB files that not totally deleted after uninstalling. Restart your NAS then begin the install process.
Do you by any chance know where these files are located? I think, I've already deleted them but maybe I didn't find all of them...

I don't find any MariaDB5 files on the NAS:
NASFiles.PNG
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

The issue is still not resolved.

What I did so far:
  1. Uninstalling and reinstalling MariaDB, phpBB and phpMyAdmin several times
  2. Complete factory reset of the OS: https://forum.synology.com/enu/viewtopic.php?t=59612
  3. Deleted all MariaDB5 files first, deleted all MariaDB10 afterwards, too. (MariaDB5 files were only located in /usr/libexec/ and usr/local/libexec) --> I searched them via SSH and

    Code: Select all

    find -name *maria*
  4. Set the ports in the php settings according to the post here: https://forum.synology.com/enu/viewtopi ... 37#p490892
  5. I'm not using virtual hosts either and my NAS is only running locally, so no port forwarding to the internet --> My hostname/ url is set to localhost in the settings --> See suggestion of Ralport: posting.php?mode=reply&f=556&t=2441286#pr14840386
Actually, nothing worked for me. I'm getting the same error messages again.
Seems like the only working option is to install MariaDB10 and phpMyAdmin from the Synology packages and phpBB manually from the packages provided (Including manual configuration).
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

I guess I will stop to use phpBB. Even an install from the phpBB official zip packages crashes with an 404 error when clicking on the install button on the app.php... :D And the support is not so good as with other software.
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

This problem could be resolved by removing all occurences of NeedMigrateDB:

Code: Select all

NeedMigrateDB()
{
	local version="$1"
	if [ -z "$version" ] || [ "$version" -le "$MIGRATE_DB_VERSION" ]; then
		return 0
	fi
	return 1
}
And all the checks, e.g.:

Code: Select all

if NeedMigrateDB "$version"; then # check if needing to migrate MariaDB 5
The problem is: I don't know how to recompile the *.spk file from https://archive.synology.com/download/P ... spk/phpBB/ to not get the error "Invalid file structure" when trying to install the modigied package manually over the package center.


If there is any other option to tell the installer not to check for MariaDB5 (as it's not installed), please let me know. :)
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

I've now found out how to customize Synology packages from the links:
https://forum.synology.com/enu/viewtopic.php?t=85983
https://forum.synology.com/enu/viewtopic.php?t=10575
https://amigotechnotes.wordpress.com/20 ... your-lamp/

Github repository is here:
https://github.com/SeppPenner/PhpBBFixMariaDB5Issue

The problem is: It again doesn't work...
User avatar
Marc
Development Team Leader
Development Team Leader
Posts: 5657
Joined: Tue Oct 30, 2007 10:57 pm
Location: Munich, Germany
Name: Marc
Contact:

Re: phpBB Update on Synology fails due to MariaDB database error

Post by Marc »

It's kind of difficult for us to support any special type of package.

phpBB itself will always try to connect to the database that it's offered. If you upgrade to MariaDB 10 and phpBB is trying to connect to MariaDB 5, then the Synology package is passing the MariaDB 5 settings to it.

If you upload the phpBB full package and get a 404 on install/app.php, then the package was not fully updated. The package contains install/app.php so it'll take the magic of "not uploading all files in the package" to get a 404 on that one (or a different configuration problem relating to Synology for that matter).
HansM2013
Registered User
Posts: 10
Joined: Tue Oct 03, 2017 2:27 pm

Re: phpBB Update on Synology fails due to MariaDB database error

Post by HansM2013 »

I finally found a solution:

1. Install both database versions (MariaDB 5 and 10).
2. Import the whole mysql dump from before.
3. Add the same users (root) to both database versions.
4. Install phpBB on Synology package center with the passwords and a user for phpBB with some password.
5. I got an error: Database already exists" --> Dropped database for phpBB in MariaDB10.
5. Install was successful.
6. Uninstalled MariaDB5.
7. The board works again but posting is not possible. (There are some forum posts on this issue already and I will try to find a solution for this, too.)
Post Reply

Return to “phpBB Discussion”