Jump to content
xisto Community
Sign in to follow this  
iGuest

moving phpBB forum from one server to another

Recommended Posts

I have a free hosted site and now I ALSO have a paid site. Both at freenukehosting and actually the same server/IP address. But different accounts.I use the free site as a testing site. At the moment, I'm testing a phpBB forum. I feel satisfied with the forum and would like to copy the forum and upload it to the new paid hosted site.I tried to download the whole directory with all the phpBB-files for the forum and then uploaded it to the new site via FTP.How do I move the mySQL databases from the test site, to the new paid site? Is it possible to restore the whole forum at the new site or do I really have to start from scratch?Regards,Davidw

Share this post


Link to post
Share on other sites

1.First, you download whole phpbb directory from old serevr and up load it to new ones.2.Then you Log in to phpmyadmin (old server) and click to your phpbb database name (ex: name_phpbb) and click to "export" button . Select all field and save as a .sql file.3.finally, you log in to phpmyadmin(new server) and creat a database name like your old db (Ex: name_phpbb) . Click to 'SQL" button and browse to your sql file. Done!

Share this post


Link to post
Share on other sites

You will save me an hour's work... Fantastic.Thanks! :D I will try it soon! Actually I did your item one, but the copied phpBB files kept calling the test site files. Please note that the new and old sites are both on the same machine/IP at freenukehosting, but on different virtual servers/sites/accounts. I got worried that the sql files were stored in a central area for all accounts (where ARE the SQL files stored??) and that the phpBB files coding, pointed to the testsite, instead of the new site.If you have some information about the above, then I'd really like to hear about it!Best Regards,Davidw

Share this post


Link to post
Share on other sites

Don't worry! If you finish upload your phpbb files to your new server , you must sure that you know about your sql username and sql database name in your new server. If it empty, log in to Control panel to make it! When you have an sql username and sql database name (ex: sqluser: david_phpbb, sqldatabase: david_phpbb), go to your phpmyadmin and make these steps above. In your phpbbfiles. open config.php and correct these information about sql databse and sql username (with passwords) with new ones. Sorry about my bad English!

Share this post


Link to post
Share on other sites

Hi again!

Your English is fine!

 

I tried to do what you said, but when I try to upload the SQL file, I get these errors in phpmyadmin:

---

SQL-query:

 

-- phpMyAdmin SQL Dump

-- version 2.6.0-pl3

-- https://www.phpmyadmin.net/

--

-- Host: localhost

-- Generation Time: Dec 25, 2004 at 03:53 AM

-- Server version: 4.0.22

-- PHP Version: 4.3.9

--

-- Database: `davidw1_phpbb1`

--

-- --------------------------------------------------------

--

-- Table structure for table `phpbb_attach_quota`

--

DROP TABLE IF EXISTS `phpbb_attach_quota` ;

 

CREATE TABLE IF NOT EXISTS `phpbb_attach_quota` (

`user_id` mediumint( 8 ) unsigned NOT NULL default '0',

`group_id` mediumint( 8 ) unsigned NOT NULL default '0',

`quota_type` smallint( 2 ) NOT NULL default '0',

`quota_limit_id` mediumint( 8 ) unsigned NOT NULL default '0',

KEY `quota_type` ( `quota_type` )

) TYPE = MYISAM

 

MySQL said: Documentation

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_id` mediumint( 8) unsigned NOT NULL default '0',

`group_i

---

 

Do you have any advise???

 

Please note that when I am in the Export screen in phpmyadmin, there are many options and I am a little unsure of what I should choose... I do not know if the above errors have any relationship to these options settings. Here is what I selected as options:

---

SQL options

Add custom comment into header (n splits lines): <nothing>

Enclose export in a transaction: <nothing>

Disable foreign key checks: <nothing>

Structure:

Add DROP TABLE: <YES>

Add IF NOT EXISTS: <YES>

Add AUTO_INCREMENT value: <YES>

Enclose table and field names with backquotes: <YES>

Add into comments

Creation/Update/Check dates: <NO>

Data:

Complete inserts: <YES>

Extended inserts: <YES>

Use delayed inserts: <YES>

Use ignore inserts: <YES>

Use hexadecimal for binary fields: <YES>

Export type: <REPLACE>

---

Also note that I, just to be sure, used gzip, to be sure nothing is changed regarding line breaks.

 

Regards,

davidw

Share this post


Link to post
Share on other sites

I tried another way to export and restore the phpBB SQL database, by using cPanel's backup and restore feature (NOT via phpMyAdmin). This seems to work and when I go into phpMyAdmin to see if all 37 tables are there, they look good... BUT:When I try to log in to my phpBB site, I get the following error and I don't see any phpBB pages:---Warning: mysql_connect(): Access denied for user: 'davidw_phpbb1@localhost' (Using password: YES) in /home/davidw/public_html/circus/db/mysql4.php on line 48Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/davidw/public_html/circus/db/mysql4.php on line 330Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/davidw/public_html/circus/db/mysql4.php on line 331phpBB : Critical ErrorCould not connect to the database---I think that this is a password error. The two phpBB sites (original and backup) have different usernames; mySQL will only make usernames that have the site-admin-user-for-cPanel as the prefix in the username. For example: my personal account at freenukehosting has the username davidw . Alle usernames in mySQL write usernames as davidw_username . On the other account my site-admin-user-for-cPanel is davidw1. So all SQL username for this account are like davidw1_username . I can't even change this prefix. The prefix is automatically added to the username. If I try to change the username in phpMyAdmin, I get an error saying that I do not have permission to change. If I look into the config.php file , there is the following:---<?php// phpBB 2.x auto-generated config file// Do not change anything in this file!$dbms = 'mysql4';$dbhost = 'localhost';$dbname = 'davidw1_phpbb1';$dbuser = 'davidw1_phpbb1';$dbpasswd = 'somethinghere';$table_prefix = 'phpbb_';define('PHPBB_INSTALLED', true);?>---If I change the davidw1 to davidw, I still get the above mentioned errors. I thought that the dbpasswd was the same as the admin password in the phpBB mySQL table phpbb_users. But the MD5 hash is different then the "somethinghere" above. The MD5 password is 32 characters long and the above is only 10 characters long. Even if I try to change the user password in the cPanel mySQL panel, it does not help.I am really worried that freenukehosting does not let me make a good backup of the database... one that I really can restore!Please advise!Regards,davidw

Share this post


Link to post
Share on other sites

Hi DarkminD and all!I have solved my problem and could make a succesful restore to another site other than the original site (they are both on the same server).There are actually some extra steps to take, compared to what you explained to me, DarkminD. But you really gave me some great clues. I will, at a later time, make a turtorial, which I'd like to show you and we can discuss this. When we are finished, I propose that we move it to the tutorial forum.One of the main problems, is the fact that both of my sites are located on the same server (IP) at freenukehosting. This means that there are some small, but important changes to the mySQL database file (import file).I will be back soon! :roll: Regards,davidw

Share this post


Link to post
Share on other sites

hi Davidw! I vary happy when i know you solved your problem. :D! I can't understand all of your words (my English very bad, it's true!) so i can't explain what you need. Wait for your news!

Share this post


Link to post
Share on other sites

DarkminD,What languages do you speak??

Maybe (but probably not) I can get somebody to translate...

Regards,
Davidw :wink:


Vietnam languages...

Share this post


Link to post
Share on other sites

(NOTE: Dear Moderator! Should this post be moved to another area in the Tutorial's forum?)

 

The following is the way I moved a test phpBB site from my free-freenukehosting account to a paid-freenukehosting account. I had some problems, because both sites are on the same IP address, so I had issues, where the moved site contacted the MySQL database at the OLD test phpBB site. But... I resolved the problem in the following way:

 

1) In the NEW site: It is best and easiest, if you don't have any MySQL databases or users. Check this in cPanel's "MySQL Databases".

 

2) In the NEW site, create a completely new phpBB site via cPanel's "Scripts Library"; give it the exact same setup as the OLD phpBB site (name, admin and directory path). For example: if your old phpBB directory name was "myphpbb_site", then give the new directory the exact same name AND location.

 

3) In the NEW site: Just to check, go into cPanel's "MySQL Databases" to be sure that the phpBB setup has automatically created a new database and user. The names should be EXACTLY the same as the OLD site phpBB database and name. If not, correct the problem (for example delete the phpBB setup in the cPanel's "scripts Library" and start over again).

 

4) In the NEW site: via cPanel's "File Manager" pr FTP, copy the file config.php that is in the new phpBB directory. Save it on your home computer.

 

5) In the OLD site: copy your complete phpBB site directory with ALL contents to your home computer. FTP is very, very nice for this task!

 

6) In the NEW site: via cPanel's "File Manager", rename the new created phpBB site directory. For example: if the directory name was "myphpbb_site", rename it to "myphpbb_site_forgetme".

 

7) In the NEW site: UPLOAD your complete "OLD" phpBB site to the same location as "myphpbb_site_forgetme". The end result should be that the "public_html" directory contains (among other items) the two directories: "myphpbb_site_forgetme" and "myphpbb_site".

 

8) In the NEW site: via ftp or File Manager, COPY and OVERWRITE the file config.php (see step 4) from your home computer to your "myphpbb_site" that you have just uploaded.

 

9) In the OLD site: go to cPanel's "MySQL Databases". In the new window, almost at the bottom, click on the link to "phpMyAdmin". A new window opens. We will now download the database that you have been using for your old phpBB site. On the left menu, choose your phpBB database. The main menu should change and then click the "Export" tab at the top of the page. The "Export" menu opens. Underneath the list of tables, click "Select All". On the right, under "Structure" and "Data" put a check in all. Below, put a check in "Save as File". DO NOT give it a name in the "File name template". Just be sure that "Remember Template" is checked. I didn't use compression. Now hit the "Go" button and choose where to download the file on you home disk.

 

10) Find the backup of the downloaded database on your computer and open it in your favorite text editor. Find the string in (maybe) line 10: database: and be sure that it is the correct database name. Find the string (around line 216): server_name and change the servername to the new servername. Save and close the file.

 

11) In the NEW site: via cPanel's "MySQL Databases", use "phpMyAdmin" and in the right panel, find the database that you actually created in step 2. The main window updates and click on the "SQL" tab at the top of the window. Be sure that your database name is the correct name at the top of the window: Run SQL query/queries on database <your database name>. At the bottom, click the "Browse" button and find the database that you have just edited on you local computer. Click "Go". The database that you created in step 2 will now be overwritten with the database from you "OLD" site.

 

12) That's it! You can, if you wish, now delete the folder and contents of "myphpbb_site_forgetme".

 

Regards, Davidw

 

PS: If you find "bugs", then let me know, I will then update this "how to".

Share this post


Link to post
Share on other sites

Hey! that's very good! But i do anotherway , there's some result.1.Download all folder in old server.(in phpbb forum)2.Up load to new server (same folder name as old one)3.in phpmyadmin in oldserver, export phpbb sql .4.In new , creat SQL data,user and pass. SQL file have just exported.5.Open config.php and correct sql data,user,host name, pass as you have just created. All steps must be done exactly!

Share this post


Link to post
Share on other sites

Hi DarkminD,I am sorry, but I really tried your solution, but got problems. I am sure your solution actually works for you, but there must be some detailed steps that are unclear in your description. My problem is that I have very little experience with MySQL and therefor had to make the above process as foolproof as possible (yes I am a fool, when it comes to programming and scripting!). Letting cPanel do the database/database-user creation felt better then letting me do it. :wink:Regards,Davidw

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.