Restore old phpBB site from database and site files

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Restore old phpBB site from database and site files

Post by briandevcali » Tue Aug 25, 2015 9:42 pm

Hello everyone,

I have mild experience with web design. I make sites for clients using wordpress. I know a bit of my way around php and phpmysql and think I may be able to figure this out with a bit of direction from this community.

Here is the situation:

A group of friends and myself used to have a creative writing forum. It is near and dear to our hearts but the administrator let the hosting lapse and he has since disappear so we cannot renew the hosting for the site and all access to is has been lost.

We do have access to a database backup and a backup of the site files as well. We want to restore the site to its original form.

Any direction with this is greatly appreciated. I can provide more information on request as I am not quite sure what information would be required to provide us with adequate direction.

Thank you all in advance for all of your advice.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69422
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Restore old phpBB site from database and site files

Post by KevC » Wed Aug 26, 2015 8:55 am

You need to know which version of phpBB it is first.

If you open the database backup file in a text editor, search for 'version' and the database input after that should say which it is.

If not, what is the name of the last table in the file?
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 3:17 am

I was given a folder with multiple sql files in it so I am trying to deduce which one is the correct one. Is there a way to tell the name of the database file from the site config.php file? here are the contents of the config file

<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'portalstones';
$dbuser = 'portalmaster';
$dbpasswd = '*************';

$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>


the database i opened says phpMyAdmin SQL Dump version 2.6.4-pl4
the other database has the same version

with the sql files i have one that is portalstones.sql and one that is psmain.sql and one that is psold.sql

portalstones.com is the name of the old site. we cannot access the domain name anymore. I have a new install of phpBB on portalstones.net

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 3:27 am

so Im guessing here. taking a stab at it:

1) in my fresh install the database is named rebornim_phpbb48c' and the table prefix is ljd_

2) in the old db file the dbname is portalstones and the prefix is phpbb_

3)in myphpadmin open rebornim_phpbb48c and import portalstones

4)copy old site files to overwrite fresh install files(backing up fresh instal config.php)

5)overwrite old config.php with new config.php

6) change table prefix to phpbb_

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 3:44 am

I tried importing the tables from the sql file portalstones and it appeared to go well except for the 'archives' table as it already existed from the fresh install database. should i drop that table?


edit:none of my tables were loading correctly so I dropped all tables from the database and imported. this time the importing went smoothly. I am thinking now though that I may have erased the original database credentials from the fresh install

User avatar
Lumpy Burgertushie
Registered User
Posts: 66822
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restore old phpBB site from database and site files

Post by Lumpy Burgertushie » Thu Aug 27, 2015 3:52 am

there is no "archives" table in standard phpbb,.

not sure what you are doing.

to get your old board up and running on the new server:

1. on your new host, create a new blank database for the board
easiest is to use the same database name, username and password as what is listed in the config.php file of your old board.

2. upload all of the old phpbb files to the server using ftp, best to just upload the complete folder with all the phpbb files in it. if the old board was in a folder named phpbb the upload that folder to the new server.

3.access phpmyadmin on your new server.
import the old database sql file to the new blank database.

4. now , your old board should be working , you should be able to log in using the same username/password that you had before.
you will probably need to go into the admin panel and change the cookie and server settings from the old .com to the new .net


now you can easily find out what version you have and make decisions about updating/upgrading from there.


robert
Last edited by Lumpy Burgertushie on Thu Aug 27, 2015 3:55 am, edited 1 time in total.
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66822
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restore old phpBB site from database and site files

Post by Lumpy Burgertushie » Thu Aug 27, 2015 3:53 am

Lumpy Burgertushie wrote:there is no "archives" table in standard phpbb,.

not sure what you are doing, but I would start over. delete everything you have done on the new server so far.

to get your old board back up and running:

1. on your new host, create a new blank database for the board
easiest is to use the same database name, username and password as what is listed in the config.php file of your old board.

2. upload all of the old phpbb files to the server using ftp, best to just upload the complete folder with all the phpbb files in it. if the old board was in a folder named phpbb the upload that folder to the new server.

3.access phpmyadmin on your new server.
import the old database sql file to the new blank database.

4. now , your old board should be working , you should be able to log in using the same username/password that you had before.


now you can easily find out what version you have and make decisions about updating/upgrading from there.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 3:57 am

ok that makes a lot more sense now.

the old files were in a folder called www so i opened that folder and uploaded it via ftp selecting overwrite all to wipe out everything from the new install.
i am still trying to figure out how to create a new database in myphpadmin.

i tried uploading my database file but it was too big. I tried compressing it to upload and it timed out without uploading all the tables.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66822
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restore old phpBB site from database and site files

Post by Lumpy Burgertushie » Thu Aug 27, 2015 4:04 am

exactly what was the old url to the board?

you can go to your hosting control panel and create the database.

you really should delete the new install using your ftp instead of doing the overwrite thing.

the new version you installed will probably have some files/folders that your old version will not and therefore, if you upload the old version it will only overwrite the ones of the same name and leave the others in place.

that will become confusing at best and may cause problems at worst.

so, use the ftp, delete everything that is there in the way of phpbb files/folders and start over.

you said the old one was in a folder named www. www is not part of the url and you would not upload or create a folder named www on the new server.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 4:09 am

when I create the database with my hosting provider it adds a prefix. do i have to put those prefixes in the config file?

'rebornim_portalstones' dbname
'rebornim_portalm' dbuser

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 4:29 am

ok so. I did create a new database file and created a new database user and assigend the user to the database file. I have to do this outside of phpmyadmin with my hosting provider(bluehost who i do plan on changing. ack)

so the main url or user or something from when i created the account requires everything to have this rebornim prefix.

so now i have the new database called 'rebornim_portalstones' and the user is 'rebornim_portalm'
i made the changes to reflect this in the cofig file which now looks like this:

<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'rebornim_portalstones';
$dbuser = 'rebornim_portalm';
$dbpasswd = '********';

$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>


now...i am in the process of emptying the new install via ftp and then will reupload the old site files(going inside the www folder, selecting all, and sending. these are the site files)

the old url was portalstones.com we do not have access to that url anymore...so we purchased portalstones.net

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 4:31 am

also, trying to find a way to upload the database as it is 100mb and the max allowed upload with phpmyadmin is 50mb

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 5:26 am

ok so I got the files uploaded via ftp and got the database imported. went to the site portalstones.net and it actually has the look and feel of the old site which is really awesome. the only problem here is that it looks like there is some error message about recovering missing data. This might be because of a database error. one of the members did say that the database was deleted by accident during a backup and things had to be fixed. so I guess i have to use an entirely different database.

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 6:32 am

right now i am trying to get into the site to manage it via the phpBB management portion of things. How can I change the admin username and password from the mysql database?

briandevcali
Registered User
Posts: 13
Joined: Tue Aug 25, 2015 9:37 pm

Re: Restore old phpBB site from database and site files

Post by briandevcali » Thu Aug 27, 2015 6:41 am

did a search for that and changed the admin to admin1 and admin as password with a query. now logged in as that and it says "This Board is Currently Disabled". I dont know where i would go to manage the back end of this site.

also has this error at the bottom:
[phpBB Debug] PHP Notice: in file /newsmod/featuresConfig.php on line 40: mysql_connect(): Access denied for user 'portalmaster'@'localhost' (using password: YES)
Could not connect to DB server!

Locked

Return to “[3.0.x] Support Forum”