h-buck Posted June 28, 2005 Posted June 28, 2005 I have a phpBB forum up and running. It is installed in a folder named GVforum. I wanted to duplicate the forum exactly so that I can use the second copy to install and test mods, etc. What I tried was to copy the entire GVforum folder to a new folder called testforum. I was then able to start phpBB from the new folder, access the admin panel and go to general adnministration/configuration where I changed the script path to testforum and modified the forum title to testforum. That all seemed to be working until I went back to GVforum and discovered that the changes I made in testforum were also reflected in GVforum, and vice versa. I'm guessing that this is because the underlying sql database was being accessed by both copies. Is that right ? What do I need to do to keep the two copies of my forum on the same server and yet functionally separate them? Quote
TCH-Rob Posted June 28, 2005 Posted June 28, 2005 I am sure there is another way to do this but all I can think of is to create a new database and copy the contents of the existing forum into it. Then change the config in the new forum to use the new database. Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 I am sure there is another way to do this but all I can think of is to create a new database and copy the contents of the existing forum into it. Then change the config in the new forum to use the new database. <{POST_SNAPBACK}> Is there a method available to copy an existing database to a new one with a different name ? Right now that would be pretty efficient because my forum is brand new and there are only a few posts. Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 Is there a method available to copy an existing database to a new one with a different name ? Right now that would be pretty efficient because my forum is brand new and there are only a few posts. <{POST_SNAPBACK}> Can't see how to edit the above so here is expanded version: There is no way to copy database tables either to a different folder or to a different filename in the same folder, that I can see in either cpanel or in phpAdmin. Also Using cpanel's filemanager I cannot locate the database files that phpAdmin shows me. Where are they ? I tried using PhpAdmin to create a new database and got the following error message: #1044 - Access denied for user: 'xxxxxx@localhost' to database 'xxxxxx_phpbb2' Would it work to install phpBB a second time, to a new folder? Would I then have to manually recreate the categories and forums to duplicate what Ihave on my 'live' forum ? How about if I backed up the structure in the live database and used that file in a restore operation to the second ? I know I could just experiment with this but I worry that the experiment might screw up the live forum. That's why I want the test forum in the first place. There must be a lot of forum administrators here, how have you set up a development version of your forum ? On a separate server ? Quote
TCH-Rob Posted June 28, 2005 Posted June 28, 2005 How about if I backed up the structure in the live database and used that file in a restore operation to the second ? That is what I was referring to. Sorry I did not make it clear earlier. Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 (edited) That is what I was referring to. Sorry I did not make it clear earlier. <{POST_SNAPBACK}> OK. Now how does one create a second database ? PhpAdmin gave me an error message when I tried. Would it work to do a second install of phpBB to a different folder in my same server account ? Edited June 28, 2005 by h-buck Quote
TCH-Rob Posted June 28, 2005 Posted June 28, 2005 It might be faster to install a second copy as you might want to open a ticket to find the answer to the error you are getting. Quote
TCH-Don Posted June 28, 2005 Posted June 28, 2005 After you create second forum goto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export check below save as file, compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 (edited) After you create second forumgoto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export check below save as file, compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go <{POST_SNAPBACK}> Before I saw this I discovered how to use the phpMyAdmin/Operations/Copy database/ to create a second database named testforum. Seems to me that would do the same as above, right ? Then I started the second copy of the forum software that was installed in a folder called testforum, and told it to get scripts from testforum. However there was no apparent way to tell it what database to use and it seemed to go right on using the original GVforum database because when I added a caegory to one board it was also there in the other. So now I have the two databases I need but haven't changed the symptom. Maybe this is happening because I created the second forum by copying the first into a new folder. I think my next trick will be to do a fesh install into the folder testforum. Think it will see there is already a testforum database and choke ? Edited June 28, 2005 by h-buck Quote
TCH-Rob Posted June 28, 2005 Posted June 28, 2005 Find the config.php in your new forums directory and you can edit what db it uses from there. If I were doing a full cPanel install from scratch into the new folder I would delete the testforum db first just to have things in order Quote
OldTimer Posted June 28, 2005 Posted June 28, 2005 May be of some help. http://www.phpbb.com/kb/article.php?article_id=55 greg Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 Find the config.php in your new forums directory and you can edit what db it uses from there. If I were doing a full cPanel install from scratch into the new folder I would delete the testforum db first just to have things in order <{POST_SNAPBACK}> Yah. I did delete the testforum database and the testforum folder and then did a freesh testforum install. That created a second forum with none of the categories, topics, members of GVforum and the two forums were able to operate independently. So far so good. Next I used the internal phpBB restore database function to load in a copy of GVforum's database that was slightly different than the current one because it lacked one forum category (ironically named Humour). That went well and at that point testforum looked like GVforum except for the one category difference I expected, - so my new forum lacked humour . Even better, I was now able to navigate either forum without it getting tangled with the other (as seen in the browser's url bar). It went bad though when I tried to log in to the administrators panel on testforum and ended up in the panel for GVforum. Also tried logging in as user and found that any attempt to login to testforum takes me to GVforum. Once logged in though I can go back to testforum and everything works OK, I even made a test post. However I cannot figure out how to log on to the administrator's panel in testforum. Always end up back at GVforum. BTW, the config.php files for the two installs mention different databases and the two forums behave like they keep the databases separate now. Remaining problem is the 'crossover' on login and inability to login to testforum's admin panel. Quote
h-buck Posted June 28, 2005 Author Posted June 28, 2005 May be of some help.http://www.phpbb.com/kb/article.php?article_id=55 greg <{POST_SNAPBACK}> Thanks. I am trying to acheive a complete separation between 2 databases not share one, so that article seems to be a way to create the problem I am trying to get rid of, but sometimes it is helpful to know how to do that. Quote
TCH-Don Posted June 28, 2005 Posted June 28, 2005 Maybe this is happening because I created the second forum by copying the first into a new folder. Thats why I suggested to create a new forum not use the copy the copy will access the old database. A new install will create its own empty database. Then follow my steps above to to copy the old database posts and categories and import into the new database. Quote
OldTimer Posted June 28, 2005 Posted June 28, 2005 (edited) Thanks. I am trying to acheive a complete separation between 2 databases not share one, so that article seems to be a way to create the problem I am trying to get rid of, but sometimes it is helpful to know how to do that. <{POST_SNAPBACK}> Well I'm completely confused then on what your trying to do. Why not just install two boards in seperate folders? If you only want to test out different mods. I best just keep quiet, seems like the others understand what you want better then me. greg Edited June 28, 2005 by OldTimer Quote
TCH-Rob Posted June 28, 2005 Posted June 28, 2005 Dons way is faster and works great if you have not modified your forum too much. Create a new board in cPanel and export/import the db. If you have done a number of modifications then you might take a longer route. Create a new folder, copy the contents of the old board to the new folder. Create a new db, export/import tables from old to new and edit config.php to reflect new db. Quote
h-buck Posted June 29, 2005 Author Posted June 29, 2005 Dons way is faster and works great if you have not modified your forum too much. Create a new board in cPanel and export/import the db. If you have done a number of modifications then you might take a longer route. Create a new folder, copy the contents of the old board to the new folder. Create a new db, export/import tables from old to new and edit config.php to reflect new db. <{POST_SNAPBACK}> I'm back.. and have solved the problem using the method Don recommends. I installed a second copy from cPanel, backed up the first forum using the internal phpBB backup and then restored it to the second using the internal restore. That recreated the structure and content of the first board in my new test board. The only glitch was that logging in to the second put me in the first. That turned out to be a cookie thing and I had to go into my browser and get rid of old cookies from the original site and also change the name of the cookie in the new site to be different than the first. Thanks for the help . Quote
ubergal Posted August 20, 2005 Posted August 20, 2005 After you create second forumgoto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export check below save as file, compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go <{POST_SNAPBACK}> Hi. I followed your instructions all the way through, but ended up getting an error. The error page had 2 red boxes. The second one said: "MySQL said: ? #1050 - Table 'phpbb_auth_access' already exists" Above that in the first box was some "SQL-query" information and then the following: -- -- Table structure for table `phpbb_auth_access` -- CREATE TABLE `phpbb_auth_access` ( `group_id` mediumint( 8 ) NOT NULL default '0', `forum_id` smallint( 5 ) unsigned NOT NULL default '0', `auth_view` tinyint( 1 ) NOT NULL default '0', `auth_read` tinyint( 1 ) NOT NULL default '0', `auth_post` tinyint( 1 ) NOT NULL default '0', `auth_reply` tinyint( 1 ) NOT NULL default '0', `auth_edit` tinyint( 1 ) NOT NULL default '0', `auth_delete` tinyint( 1 ) NOT NULL default '0', `auth_sticky` tinyint( 1 ) NOT NULL default '0', `auth_announce` tinyint( 1 ) NOT NULL default '0', `auth_vote` tinyint( 1 ) NOT NULL default '0', `auth_pollcreate` tinyint( 1 ) NOT NULL default '0', `auth_attachments` tinyint( 1 ) NOT NULL default '0', `auth_mod` tinyint( 1 ) NOT NULL default '0', KEY `group_id` ( `group_id` ) , KEY `forum_id` ( `forum_id` ) ) TYPE = MYISAM I'm in territory I know nothing about here. Do you know why I got this error and how I might fix it? Thank you. übergal Quote
TCH-Dick Posted August 20, 2005 Posted August 20, 2005 Since the DB is already there you just need to export/import the data. I have added the steps neeeded to Don's directions. After you create second forum goto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export under SQL options uncheck Structure check below save as file, compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go Quote
ubergal Posted August 20, 2005 Posted August 20, 2005 Since the DB is already there you just need to export/import the data.I have added the steps neeeded to Don's directions. After you create second forum goto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export under SQL options uncheck Structure check below save as file, compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go <{POST_SNAPBACK}> Thank you. Okay, I did all of that and now get the following error: Error SQL-query: -- -- Dumping data for table `phpbb_banlist` -- -- -- Dumping data for table `phpbb_categories` -- INSERT INTO `phpbb_categories` VALUES ( 2, 'übergal''s domain', 20 ) MySQL said: #1062 - Duplicate entry '2' for key 1 Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 685 THERE is a "Browse" button at the bottom of this which leads to the following: Error SQL-query: SELECT * FROM WHERE LIKE 'config_id' MySQL said: #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 'WHERE LIKE 'config_id'' at line 1 :/ Me not knowing what it's talking about again. Thanks for all your help! ü Quote
TCH-Dick Posted August 21, 2005 Posted August 21, 2005 We can try this a different way, which will delete the tables there then recreate them and insert your data. After you create second forum goto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export under Structure check Add DROP TABLE check below save as file compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go Quote
ubergal Posted August 21, 2005 Posted August 21, 2005 We can try this a different way, which will delete the tables there then recreate them and insert your data. After you create second forum goto mysql (which is where you create databases by the way) at the bottom of mysql goto phpmyadmin select current database on the left after it loads, click export, click select all below the word export under Structure check Add DROP TABLE check below save as file compression zipped click GO at right select save to disk browse to a folder on your computer then on lthe left select the new forum database select at top SQL at bottom find Location of the textfile: browse to file on your computer leave compression on autodetect, click go <{POST_SNAPBACK}> Yay! It worked! Thanks for that. Ummmmm.... Now there's a new problem though. (You thought this would be easy, didn't you? ha ha ) When trying to access the new board, I get a page with this message: message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php? Waddaya think? ü Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.