Author |
Message |
jage Board Member
Joined: 13 Jan 2009
Posts: 4
|
Posted: Tue Jan 13, 2009 1:42 pm Post subject: Duplicate Board for Development |
|
|
website: www.sportsmobileforum.com / dev.sportsmobileforum.com
version: 2.0.22
installer: fantastico (I know I know)
experience: moderate with phpbb, advanced as programmer (php, mySQL)
misc: I have access to the root level server, /home etc and am using WHM to create accounts such as dev. for testing. Also have Bitvise for SSHD access, xterm & sftp although no vterm.
I tried to make a copy of the board for development, and I need a separate database. I created a new account and FTPd all the files from public_html to public_html.
The dev site is still using the www site database.
I was going to backup the www database and install an identical phpbb board, restore the database and copy the modded www files- but fantastico has dropped the 2.x version so I would have to install fresh, via FTP (which is time consuming)
So- should I create a new/duplicate database on dev and change the php files to point to it? How do I create or copy the database? How/where do I change the pointer or registration to the new database?
Or- should I install 2.0.22 and restore the database to the new location and copy the modified phpbb files?
Or- is there a better way to go about getting a separate copy of the site and database? _________________ It would be a lot funnier if this board was powered by phpBB 3.0 |
|
Back to top |
|
|
drathbun Board Member
Joined: 24 Jul 2008
Posts: 729 Location: Texas
|
Posted: Tue Jan 13, 2009 2:33 pm Post subject: Re: Duplicate Board for Development |
|
|
Hi, welcome.
When you copy a database to a new url (from www. to dev.) then you need to update a few rows in the phpbb_config table. One that comes to mind immediately is the script_path, and the other is related to the cookie setting. I can't get to a database right now but if you browse the phpbb_config table and look for anything that references the old path and update it to the new path you should be fine.
Oh, and make sure that config.php points to the second database and not the first. _________________ phpBBDoctor Blog |
|
Back to top |
|
|
jage Board Member
Joined: 13 Jan 2009
Posts: 4
|
Posted: Tue Jan 13, 2009 5:59 pm Post subject: Re: Duplicate Board for Development |
|
|
Ok, here is what I've done so far, this is in addition to creating dev and copying the public_html folder as above:
Code: | Went into phpMyAdmin as root in WHM
Under Operations tab choose Copy database, structure and data creating dev_phpb1 from www_phpb1
In config.php changed $dbname to 'dev_phpb1'
In phpMyAdmin granted all to dev user on dev_phpb1
Granted permission to www_phpb1@(internal IP) on dev_phpb1
Granted permission to www_phpb1@'localhost' on dev_phpb1
Changed cookie domain in table phpbb_config to dev.domain.com (was domain.com)
[Login not working, boots me to domain.com]
|
Currently it does boot me to domain.com from dev.domain.com when the login fails, and the login fails for all accounts. It is possible that is enough to move forward with testing, but I will update if and when I take any more steps. _________________ It would be a lot funnier if this board was powered by phpBB 3.0 |
|
Back to top |
|
|
Sylver Cheetah 53 Board Member
Joined: 17 Dec 2008
Posts: 426 Location: Milky Way
|
Posted: Tue Jan 13, 2009 6:11 pm Post subject: Re: Duplicate Board for Development |
|
|
You need to use Auto Cookies. Just copy over all your files, restore your database, run Auto Cookies and you should be fine. _________________ Image link
My Forum || My Blog
phpBB2 forever! |
|
Back to top |
|
|
jage Board Member
Joined: 13 Jan 2009
Posts: 4
|
Posted: Tue Jan 13, 2009 7:25 pm Post subject: Re: Duplicate Board for Development |
|
|
Used AutoCookies and changed the cookie name to dev_* and now it works fine. (Need a different cookie name for each forum) Awesome! _________________ It would be a lot funnier if this board was powered by phpBB 3.0 |
|
Back to top |
|
|
Citrix Board Member
Joined: 19 Feb 2012
Posts: 42
|
Posted: Thu Feb 23, 2012 4:50 pm Post subject: Re: Duplicate Board for Development |
|
|
jage wrote: | I tried to make a copy of the board for development, and I need a separate database. I created a new account and FTPd all the files from public_html to public_html.
...
Or- is there a better way to go about getting a separate copy of the site and database? | yes there is a better way. I just did that a couple of days ago to investigate the last attack I was victim of.
No need to create another account.
1- suppose your current forum is called forum. http://www.yoursite.com/forum
Download the entire forum folder to your hard drive.
When complete, rename the downloaded folder testforum.
zip it and ftp to your public_html folder.
Sometimes FTP takes too long.
(So if you don't want to do all the ftp stuff, from File Manager on Cpanel, change your folder name to testforum.
Zip the testforum. When done, change the folder name back to forum. ..... [Make sure nobody's surfing at that time... or disable the board for 1 minute then enable it back after you change back the name.] )
2- Log on Cpanel
3- Click on File Manager, find the zip file, Right-mouse click and select Extract. Your new testforum folder is created.
4- Go to myphpAdmin and select your old database from the dropdown menu.
5- from the db menu, select Operations
6- In the field for 'copy database to', enter a new name for your new database testdb
7- Click Go. This will create a database and copy all your old data to it.
8- Still on myphpAdmin, select the new database.
9- find the phpbb_config table and edit it.
- change the cookie name
- replace your old forum folder name /forum/ with the new name /testforum/
- save.
10 - Back to File Manager.
- find testforum/config.php
- Edit the file to replace the database name with your new database name testdb.
- save.
11. Done.
Go run your new testforum
http://www.yoursitename/testforum |
|
Back to top |
|
|
Jim_UK Board Member
Joined: 19 Nov 2008
Posts: 656 Location: North West UK
|
Posted: Fri Feb 24, 2012 6:55 am Post subject: Re: Duplicate Board for Development |
|
|
Could I ask why you keep re-activating long since dead topics?
I think it a fair assumption that the OP has solved the problem or moved on over such long periods.
If the object of this is to create extra activity then I am not sure it will work. I guess most of us with any interest check the site daily for new posts but could find it a bit of a turn off when faced with so many reawakened topics.
Jim |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Mon Feb 27, 2012 3:39 am Post subject: Re: Duplicate Board for Development |
|
|
(And what if I dont have Cpanel) _________________ Love your data! Back it up! |
|
Back to top |
|
|
|