TinyPortal

Development => Support => Installation => Topic started by: wickedstangs on November 19, 2006, 09:22:17 PM

Title: Need help Please
Post by: wickedstangs on November 19, 2006, 09:22:17 PM
I uploaded my site to the root of my directory  (example:  public_html/index.php)  I want to move my site to a different location  (public_html/tp/index.php) can someone give me a hand on doing this.
Title: Re: Need help Please
Post by: pvcblue on November 19, 2006, 09:37:20 PM
Quote from: wickedstangs on November 19, 2006, 09:22:17 PM
I uploaded my site to the root of my directoryÃ,  (example:Ã,  public_html/index.php)Ã,  I want to move my site to a different locationÃ,  (public_html/tp/index.php) can someone give me a hand on doing this.

I just moved mine the other day - How many valium do you have???Ã,  ::)

use this thread as a reference - http://www.tinyportal.net/smf/index.php?topic=10084.0;all
Title: Re: Need help Please
Post by: wickedstangs on November 19, 2006, 11:46:46 PM
Man I just read everthing I didnt think it was going to be that much of a pain... :'(
Title: Re: Need help Please
Post by: G6Cad on November 20, 2006, 08:26:52 AM
I have moved both my own sites and other sites with out any major issues at all, if you make complete backups and follow the steps, you should not run into problems at all. So the first step is to relax, take a good look at what you have to move, then make COMPLETE backups of both DB and files. (DB through phpmyadmin) and files through FTP. Then put all the files as they are into the new directory or server, import the DB into your new database and use the repair_settings.php file from simplemachines.org downloadsection/tools, and you should have every thing working just like before.
Title: Re: Need help Please
Post by: Techdomain on November 20, 2006, 09:11:46 AM
actually, if you are moving to a different folder on the same server, you do not have to worry about the database at all.
Make a Backup of the files and database,
cut and paste files to new location,
run repair_settings.php to point to your new files
go to your site, visit admin to ensure that all theme url's are also changed.

Thats it!
Title: Re: Need help Please
Post by: wickedstangs on November 20, 2006, 01:09:09 PM
Alright i tried to delete my smf_member and in the new one and I get this?
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation 'ifnull'
Title: Re: Need help Please
Post by: IchBin on November 20, 2006, 04:29:58 PM
Why did you try to delete that?
Title: Re: Need help Please
Post by: wickedstangs on November 20, 2006, 04:49:45 PM
I am just trying to move all my members to my new forum. From reading all the inputs I thought that is how you do it.
Title: Re: Need help Please
Post by: IchBin on November 20, 2006, 05:13:29 PM
A simple export of your database from the Admin panel of SMF should be fine. And then a simple import of the database through a tool such as phpMyAdmin will put all the data back in.

You can use the tools to do the same thing. (I prefer these).
http://www.simplemachines.org/community/index.php?topic=18350.msg168327#msg168327
Title: Re: Need help Please
Post by: Techdomain on November 20, 2006, 11:03:45 PM
seriously - if you are moving directories on the same server - LEAVE THE DB ALONE!
Title: Re: Need help Please
Post by: Thurnok on November 21, 2006, 01:24:22 AM
uh.. no...

Do definately backup your database.  And then...

First and foremost, you need to consider if you have anything else in your database (calendar program, chat program, etc.).  If you do not, then the repair_settings.php file will help you by modifying your direct file paths to the new correct ones in your database.  There are a number of locations (depending how many themes you have installed) where your direct file paths and URL paths need to be updated to match the new locations.

If you have other apps using the same database as I mention above, you will need to manually update those URL paths and direct file paths to the new location.  The easiest way to do that is take the exported .SQL file and edit it with your favorite programming editor (wordpad if you have nothing else) and do a search/replace on the old/new url path and same for the old/new direct file path as necessary.

URL paths and File paths don't necessarily correlate.  It depends how your server is setup.  Most of the time it is relatively simple...

Example:
Old Url path:  http://www.mytinyportal.com
Old direct file path: /htdocs/www/mytinyportal

New Url path: http://www.mytinyportal.com/tp
New direct file path: /htdocs/www/mytinyportal/tp

.. but could be radically different depending
Example:
Old Url Path: http://www.mytinyportal.com
Old direct file path: /w4529534/users/public_html/~thurnok/www/mytinyportal

New Url Path: http://www.mytinyportal.com
New direct file path: /public_html/www/subs/mytinyportal/tp

I generally never use the repair_settings.php file myself, preferring to manually update my .SQL file with editor, doing a search/replace for what I need.  This will update all messages that have links in them, and anything else in the database where you had a link or file path for the old site like additional programs sharing the database.

Going that route, don't forget to update your settings.php file as well...
Title: Re: Need help Please
Post by: Techdomain on November 21, 2006, 10:19:15 AM
least we agree on the backup part... repair_settings has always worked well for me.
Title: Re: Need help Please
Post by: pvcblue on November 21, 2006, 01:04:08 PM
Quote from: JRW on November 21, 2006, 10:19:15 AM
least we agree on the backup part... repair_settings has always worked well for me.

Generally "repair_settings" does work - but is does not change ALL files settings. For example, when I did this it did not change the table in myphpadmin for the Downloads Manager settings, I had to go into myphpadmin and make the changes myself.  :tickedoff:
Title: Re: Need help Please
Post by: G6Cad on November 21, 2006, 05:49:34 PM
Thats because the repair_settings.php is made for SMF and not SMF with TP installed, in order to get the DB updated for TP, you need to run the DB install file only from the download section here at TinyPortal.
Title: Re: Need help Please
Post by: Thurnok on November 23, 2006, 04:46:09 AM
Telling someone to not touch their database simply because they are moving directories on the same server, without knowing anything about their database, their site, what apps they have installed, etc. is a disservice to that person.

Any application that they have installed using the same database could need database modification if it stores URL paths or direct file paths (as do SMF and TP and most apps).  As I mentioned in my original post, this has to be taken into consideration.  If you don't fall into this category, then using repair_settings.php (for SMF) and as G6 points out, the TP db install file (for TP) will get you by.

If you do have other apps installed, you will most likely need to manually update the database in the fashion I mentioned.  Even if you are unsure, the search/replace I mention takes care of any of the situations, regardless.
Title: Re: Need help Please
Post by: Techdomain on November 23, 2006, 05:29:53 AM
Telling them that they have to download and upload their database when they are on the same server is crazy - its going to the same place. Obviously, if you are moving servers then you have to... but doing so when it is completely unneeded is ludicrous, and makes what is actually a fairly simple process a whole lot more difficult... and THAT is a disservice!
Title: Re: Need help Please
Post by: Thurnok on November 24, 2006, 07:41:34 AM
JRW... your experience is obviously limited.

And apparently, you do not read posts completely.  First, I pointed out that other things need to be taken into consideration "before" making a decision on what needs to be done to the database.

And no, sir, you are completely incorrect in your statement that when staying on the same server you do not need to update the database.  First off, in both TP and SMF portions of a TP/SMF site's database it does indeed contain URL paths, and direct file paths which do indeed change when changing the path of your site.

The repair_settings.php file updates the SMF portions but not the TP portions as G6 so graciously pointed out above, which apparently you missed.

Additionally, as I pointed out, if your site has other apps and you are using the SAME database as your SMF/TP database, you probably do need to update URL paths and direct file paths for those as well.  This is what SEARCHING is all about.  Yet, you seem bent on arguing a point to instruct a user NOT to touch their database under no certain terms without knowing anything about their situation, whereas I simply pointed out they need to take all things into consideration.

Please refrain from this argument until you experience the pitfalls yourself, and do not belittle the advice of the TP Team.
Title: Re: Need help Please
Post by: Techdomain on November 24, 2006, 07:47:13 AM
Mate -
firstly thanks for the personal attack... not really warranted is it?
Secondly: all I stated was that if you are moving directories on the same server, then you dont need to download your old database and then upload it to the new site, as it is already on that server - all you need to do is point the sites db connection at it.
If that is so hard to understand, then shoot me please!
My response was completely directed to the first few posts in this forum - which you then took the liberty of shooting down? gees...

Edit: sorry I tried to help - I will just let things be in future, and do my own thing. In reality, I dont visit TP because I get anything from it - I really believe that SMF/TP combo is a REALLY good thing. That is why I try to help out when I can!
Title: Re: Need help Please
Post by: Thurnok on November 24, 2006, 08:11:56 AM
There was no personal attack.  If you feel that changing your site on the same server requires absolutely no changes under any circumstances, your experience with doing so is obviously limited due to the reasons I pointed out.  I don't think I need to repeat them.

You took it upon yourself to completely dissolute my advice on taking other things into consideration calling it ludicrous.  That is more of a personal attack in my opinion, yet I did not point it out because I'd prefer this post not turn into a bashing contest.

You apparently have SMF/TP on your site with no other applications, yet you cannot even consider the fact that other people might have other applications that contain pathing information (URL and direct), as I tried to convey to the person asking for the original help.  So I suppose I cannot understand why you could not consider that.

I'm not asking you to not help others, I'm simply pointing out that things are not always "black and white" as you would imply.  However, since this post is now getting way off track, it will now be locked.

Please continue to help others as you feel, but try to remember that not all sites are identical to your own.  Many sites might have things installed that you do not have on your own.  This means they might need to take into consideration things that you yourself do not need to.