Recover Forum

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Recover Forum

Post by William959 »

Hello everyone!

A while ago I had a forum on PHPBB, and digging through my backups I was able to find the backup database for this forum. I would like to recover this forum, but I only have the database. How can I do this?
If possible on the latest version of PHPBB.


Thank you very much in advance! :D
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Recover Forum

Post by janus_zonstraal »

upload the files from phpbb3.3.5 to your server.
Point the config.php to the old database.
go to http://yourwebsite.com/forumdirectory/install/ and update the database.
Normally this works but if you encounter errors post them here.

See https://www.phpbb.com/support/docs/en/3 ... gphp-file/ for making the config file.
Sorry! My English is bat ;) !!!
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Recover Forum

Post by warmweer »

William959 wrote: Sun Jan 23, 2022 8:03 pm A while ago I had a forum on PHPBB, and digging through my backups I was able to find the backup database for this forum. I would like to recover this forum, but I only have the database. How can I do this?
If possible on the latest version of PHPBB.
Import the database backup into an empty database.
Look at the table yourprefix_config : field version >> that's the phpversion of the database.

As to restoring the whole board: that's just a matter of uploading the phpBB files (same version as the database) including any extensions and styles you had (table _ext and table _styles), and creating the config.php.

Since the php version you need depends on the phpBB version, the easiest way is to use a personal webserver on PC and do all the work there.
Next step is updating or upgrading for which you may need a higher php version.
First find out your phpBB version, report that here and we'll take it from there.


Added: janus_zonstraal's workflow may cause problems if your board = version 3.0.x as it may need sanitising with the Support Toolkit (which doesn't work with a php version fit for phpBB3.3.5). Also if it was 3.1.x or 3.2.x. you may need to remove or disable certain extensions before actually upgrading.

Added again: looking at your post history, I suspect your board was version 3.2.x so mention the phpBB version, and the styles and extensions used (include the versions).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Re: Recover Forum

Post by William959 »

Hi warmweer and janus_zonstraal, how are you?

Thank you so much for helping me.
warmweer wrote: Sun Jan 23, 2022 8:23 pmImport the database backup into an empty database.
Look at the table yourprefix_config : field version >> that's the phpversion of the database.
I'm doing all the procedure on localhost. I created the empty database and imported the backup.
But I couldn't find the table: yourprefix_config
Here is a screenshot of all the tables that exist in my database: https://i.imgur.com/JlYhziO.png
warmweer wrote: Sun Jan 23, 2022 8:23 pmAs to restoring the whole board: that's just a matter of uploading the phpBB files (same version as the database) including any extensions and styles you had (table _ext and table _styles), and creating the config.php.
I will leave some screenshots of these tables. I noticed that the lang table is also important, so I'll leave a screenshot of this part as well.
phpbb_ext
https://i.imgur.com/Lm9kwMk.png

phpbb_styles
https://i.imgur.com/QrqyQ9N.png

phpbb_lang
https://i.imgur.com/YXjRRAR.png


Thank you very much!
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Recover Forum

Post by janus_zonstraal »

yourprefix_config
your prefix = phpbb_ ;)

You don't have any extensions installed except the standard viglink

Your styles are the standard prosilver and we_universal
And languages are the standard English and Portuguese - Brasil

You can download that style and language from here https://www.phpbb.com/customise/db/style/we_universal/ and here https://www.phpbb.com/languages/

Put them in the language folder and styles folder.
Sorry! My English is bat ;) !!!
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Re: Recover Forum

Post by William959 »

Ah yes!

Thank you for explaining and being patient with me. hahaha
My English is not the best. hahaha

Here are screenshots of the config and config_text table. I can't find the version I used on my forum. Could you help me with this?
https://i.imgur.com/Bcr8gPP.png
https://i.imgur.com/mgDTV5P.png

After finding out the version, I will download the files correctly, so we can proceed with the recovery.

Thank you very much!
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Recover Forum

Post by warmweer »

The path to follow for upgrading = Upgrading from 3.2 to 3.3
First get your 3.2.x up and running so that you can activate prosilver, set prosilver as default board style, then override user_style, disable we_universal,, and set British English as the only active language pack.
Then switch to a php version for the 3.3.5.(7.1.3+ up to 8.0.x)
Upgrade the board.
After a successful upgrade, update the we_universal style and activate it. Then you can set override user_style back to NO, update the Brasilian Portuguese language pack, activate it and that's it.

BTW the field to look for in the config_table = "version"
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Re: Recover Forum

Post by William959 »

Right! The version that is in my database is 3.2.9. Discovering this version, I downloaded the phpBB package in version 3.2.9 through this link: https://download.phpbb.com/pub/release/ ... -3.2.9.zip

Downloading the phpBB version 3.2.9, I edited the config.php with the following code.

Code: Select all

<?php
// phpBB 3.2.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'phpbb\\db\\driver\\mysqli';
$dbhost = 'localhost';
$dbport = '3306';
$dbname = 'mydatabase';
$dbuser = 'root';
$dbpasswd = '';
$table_prefix = 'phpbb_';
$phpbb_adm_relative_path = 'adm/';
$acm_type = 'phpbb\\cache\\driver\\file';

@define('PHPBB_INSTALLED', true);
// @define('PHPBB_DISPLAY_LOAD_TIME', true);
@define('PHPBB_ENVIRONMENT', 'production');
// @define('DEBUG_CONTAINER', true);
But when I visited localhost/forum it gave some errors, it follows in the screenshot. What did I do wrong?
https://i.imgur.com/PZ9ySsa.png


Thank you so much again for helping me.
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Recover Forum

Post by janus_zonstraal »

What php version are you using.
Further is it easier to post the errors here directly "between code tags"
Sorry! My English is bat ;) !!!
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Re: Recover Forum

Post by William959 »

janus_zonstraal wrote: Mon Jan 24, 2022 9:14 am What php version are you using.
Further is it easier to post the errors here directly "between code tags"
In my database it is telling me that the version I was using is 3.2.9. And the version I'm using is 3.2.9 too.

Code: Select all

Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, phpbb\template\twig\definition given in C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php:607 

Stack trace: 
#0 C:\xampp\htdocs\forum\cache\production\twig\31\3169067b189da94058c9faa176fc1f83f0aa5b9394c2743d6a6b4e68f6a1fc96.php(264): Twig\Template->getAttribute(Object(phpbb\template\twig\definition), 'STYLESHEETS', Array) 
#1 C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php(455): __TwigTemplate_a690e5a5f6c2e2f0f39453199bb2fa6e9906a54e9d618a38f4de508561b9d905->doDisplay(Array, Array) 
#2 C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) 
#3 C:\xampp\htdocs\forum\cache\production\twig\fb\fbb57549381801650002b82825611222317da8baaebd28b649d4c2d8efd771ba.php(54): Twig\Template->display(Array) 
#4 C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php(455): __TwigTemplate_0d3e083062153b9f2c8cc7f11eccd7c9b33239a4c6336a25bba31d2078903d7e->doDisplay(Array, Array) 
#5 C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array) 
#6 C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php(434): Twig\Template->display(Array) 
#7 C:\xampp\htdocs\forum\vendor\twig\twig\src\TemplateWrapper.php(47): Twig\Template->render(Array, Array) 
#8 C:\xampp\htdocs\forum\vendor\twig\twig\src\Environment.php(384): Twig\TemplateWrapper->render(Array) 
#9 C:\xampp\htdocs\forum\phpbb\template\twig\environment.php(224): Twig\Environment->render('message_body.ht...', Array) 
#10 C:\xampp\htdocs\forum\phpbb\template\twig\environment.php(194): phpbb\template\twig\environment->display_with_assets('message_body.ht...', Array) 
#11 C:\xampp\htdocs\forum\phpbb\template\twig\twig.php(317): phpbb\template\twig\environment->display('message_body.ht...', Array) 
#12 C:\xampp\htdocs\forum\includes\functions.php(4806): phpbb\template\twig\twig->display('body') 
#13 C:\xampp\htdocs\forum\includes\functions.php(3554): page_footer() 
#14 [internal function]: msg_handler(1024, 'Sorry but this ...', 'C:\\xampp\\htdocs...', 376) 
#15 C:\xampp\htdocs\forum\phpbb\user.php(376): trigger_error('BOARD_DISABLE') 
#16 C:\xampp\htdocs\forum\index.php(29): phpbb\user->setup(NULL) 
#17 {main} thrown in C:\xampp\htdocs\forum\vendor\twig\twig\src\Template.php on line 607

Thanks in advance.
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Recover Forum

Post by warmweer »

William959 wrote: Mon Jan 24, 2022 4:58 pm In my database it is telling me that the version I was using is 3.2.9. And the version I'm using is 3.2.9 too.
That's the phpBB version.

It's the php version that was asked.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Recover Forum

Post by janus_zonstraal »

Go to ACP=> general=> phpinfo for the php version.
Sorry! My English is bat ;) !!!
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Recover Forum

Post by warmweer »

janus_zonstraal wrote: Mon Jan 24, 2022 9:12 pm Go to ACP=> general=> phpinfo for the php version.
Difficult with a board that doesn't start ;)
He's using Xampp so he should easily find the php version that is being used.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
janus_zonstraal
Registered User
Posts: 6418
Joined: Sat Aug 30, 2014 1:30 pm

Re: Recover Forum

Post by janus_zonstraal »

:lol: I mixed two questions.
Sorry! My English is bat ;) !!!
William959
Registered User
Posts: 33
Joined: Wed Jun 28, 2017 1:03 pm

Re: Recover Forum

Post by William959 »

Thank you all, but manage to solve my problem. Thank you very much!
Post Reply

Return to “[3.3.x] Support Forum”