TinyPortal

Development => Support => Installation => Topic started by: stang7043 on August 13, 2010, 09:41:25 PM

Title: Quick question hopefully easily answered.
Post by: stang7043 on August 13, 2010, 09:41:25 PM
Link to my site: http://m-g-club.com/index.php
SMF version: SMF 1.1.11
TP version: TinyPortal v1.0 beta 3
Theme name and version: Custom
Browser Name and Version: n/a
Mods installed: n/a
Related Error messages: n/a


Im looking to upgrade everything to the newest ver. for both SMF and TP. Before I do that Id really like to create a mirror of the live site as a test site do the install there and test it for a week or two before updating the live site. Are there instructions out there any where where I might find how to create a test site or the easiest way to create a test site? I did some searches but couldnt find any thing on instructions of creating a test site. Is it as simple as taking a backup of the existing site creating a new folder under the root and new database and importing it or is a lot more involved ? Thanks in advance. If this is in the incorrect forum please move it to the correct one.
Title: Re: Quick question hopefully easily answered.
Post by: IchBin on August 13, 2010, 10:54:56 PM
Some simple steps:
Assuming you have a tool in your control panel for your host like phpMyAdmin.
1. Create a new database.
2. Export the database from your live forum.
3. Import the database into your new forum created in step #1.
4. Create folder in site (call it test if you want)
5. Copy all files from live site forum into the test folder created in step 4.
6. Download repair_settings.php from the SMF > Downloads > Tools page.
7. Put it in your test folder where you duplicate forum is going to be.
8. Access that file in your browser http://www.yoursite.com/test/repair_settings.php
9. Change all the paths and URL's to your new test directory path and URL.

Should be done. Viola!
Title: Re: Quick question hopefully easily answered.
Post by: winky100 on August 14, 2010, 03:43:02 PM
I would just add that when you export the database export both the structure and the data. If you only export the data then you have to empty all the tables in the new database before you import the old database, otherwise when you import the old database into the new forum you will get could not insert errors on the new database.
Title: Re: Quick question hopefully easily answered.
Post by: Crip on August 14, 2010, 04:06:15 PM
This is good information to know! 
Title: Re: Quick question hopefully easily answered.
Post by: lurkalot on August 14, 2010, 05:24:52 PM
Yep it is good info, I used it a while back to test upgrading my live site.  (haven't actually upgraded it yet though).

I think I'm also right in saying, import your database from your old SMF1 site before you upgrade to SMF2?  I don't think you can do it afterwards.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 14, 2010, 07:55:27 PM
Quote from: IchBin on August 13, 2010, 10:54:56 PM
Some simple steps:
Assuming you have a tool in your control panel for your host like phpMyAdmin.
1. Create a new database.
2. Export the database from your live forum.
3. Import the database into your new forum created in step #1.
4. Create folder in site (call it test if you want)
5. Copy all files from live site forum into the test folder created in step 4.
6. Download repair_settings.php from the SMF > Downloads > Tools page.
7. Put it in your test folder where you duplicate forum is going to be.
8. Access that file in your browser http://www.yoursite.com/test/repair_settings.php
9. Change all the paths and URL's to your new test directory path and URL.

Should be done. Viola!

Ill try that out tomorrow I appreciate the help. I do in fact have phpmyadmin. And of course I will take a backup just before I preform these steps just in case. I already have a test folder under the root html and have a database created named test<sitename>. Just one more question generally speaking changing all the paths to point to the test site would en tale hours of work going through lines of code or is it simply changing the paths when I run the repair_setting.php? Sorry guys Im total noob when it comes to this stuff. I kinda got dumped into this cause I have "computer" knowledge. lol I know nothing about web scripting or php files etc etc ... Thank God for you guys though. lol Id be totally screwed. lol

Quote from: lurkalot on August 14, 2010, 05:24:52 PM
Yep it is good info, I used it a while back to test upgrading my live site.  (haven't actually upgraded it yet though).

I think I'm also right in saying, import your database from your old SMF1 site before you upgrade to SMF2?  I don't think you can do it afterwards.

Will do. Once I have the test site up Ill work through the upgrade process step by step.



Title: Re: Quick question hopefully easily answered.
Post by: IchBin on August 15, 2010, 02:52:27 AM
The repair_settings.php file will be the only thing you need to do. It will show you all the paths and URL settings. You can simple click the corresponding link above each box to have it change the URL for you. Just make sure you verify each box and know that the settings are correct. There should be no manual editing required for you to do this. Good luck! Let us know if you get stuck.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 15, 2010, 05:11:59 PM
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg256.imageshack.us%2Fimg256%2F9446%2F8152010120418pm.jpg&hash=548970a2de8224c23ce655b98a7bc1dceb4027ab) (http://img256.imageshack.us/i/8152010120418pm.jpg/)

I point to the file and choose traditional SQL compatibility mode

When I try to import the database I get that error.

**Update I think I figured it out.** When I was exporting the DB I selected both the DB and the information_schema. I just selected the DB removed the reference to the original DB (shown below) in the sql file and was able to import it. I still have to copy everything into the test folder and change the paths. Once thats done Ill post again.


--
-- Database: `live site db name` (changed to test site db name)
--
CREATE DATABASE `mbg0819001051922` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE mbg0819001051922;
< ~~~ Removed that ref.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 16, 2010, 04:20:48 PM
arghhh .... now when I run the repair_settings.php Im getting errors connecting to mysql. the un and pw are correct. It says the server name should be localhost. I changed it to local host and it still can not connect. Would  the server name be the same as the live site because I can not remember if the server name was the same or should I leave it at local host ? Im also not sure why it cant connect. I know its something simple but just cant figure it out. Im thinking somewhere its pointing back to the live site ? Any help is appreciated.
Title: Re: Quick question hopefully easily answered.
Post by: IchBin on August 16, 2010, 04:30:15 PM
I have no idea what you're trying to do. Are you setting this up on your desktop? On a server? For the server name for your database it is usually localhost. But some hosts use a different server to provide the database. All you have to do is look at your other SMF forum in the server settings if you're indeed setting it up on the same server.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 16, 2010, 04:43:44 PM
Quote from: IchBin on August 16, 2010, 04:30:15 PM
I have no idea what you're trying to do. Are you setting this up on your desktop? On a server? For the server name for your database it is usually localhost. But some hosts use a different server to provide the database. All you have to do is look at your other SMF forum in the server settings if you're indeed setting it up on the same server.

I was following step 8 in the instructions to point the directories to the new test site directories. Yes it is on the same server / host (godaddy).
Title: Re: Quick question hopefully easily answered.
Post by: IchBin on August 16, 2010, 05:12:56 PM
Not much we can help with, with so little information. Can you post a screenshot or something? Are you only having a problem with the database settings? Any details will help.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 16, 2010, 05:31:06 PM
Quote from: IchBin on August 16, 2010, 05:12:56 PM
Not much we can help with, with so little information. Can you post a screenshot or something? Are you only having a problem with the database settings? Any details will help.

Absolutely. If this isnt the type of screen shot you are looking for let me know.

Fixed it. Rather then using the server name I used the IP for the sql server. Obviously I had the incorrect server name.



Title: Re: Quick question hopefully easily answered.
Post by: Lesmond on August 16, 2010, 09:22:06 PM
Glad you got it sorted, I will go ahead and mark this has solved.
Title: Re: Quick question hopefully easily answered.
Post by: stang7043 on August 17, 2010, 02:03:24 PM
Roger that. Thanks again for the help.