Moving from Live to Localhost
Posted: 09 May 2008 12:21 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Hello people,
Perhaps someone can share their experience or adivise on how to get this accomplished.
I have looked abound and found only a wiki entry dealing with server migration from host to host.
Here is the setup and things I have tried:
-locally I am running winXP with Wamp server
-hosted on nix
1. Downloaded all files from live site
2. Did an SQL dump/import onto my local mySQL
3. *Edited ‘exp_sites’ for paths and URLs
4. Edited ‘config.php’ in system folder

Result:
- can not login into back end ...that is form refreshes but no redirect. I can tell that db is being queried since since I do get error back if it is a wrong password.

*Not sure if step 3 where all is failing due to fact I am moving from unix system of “home/userx/public_html/” to windows “C:\web\www\sitex\”

Anyone has done similar setups/downloads/takve-overs of their client’s site?

Ideally, I would just like the access to CP so I can edit the settings/paths of weblogs,uploads etc.
Thanks for your time!

Profile
 
 
Posted: 09 May 2008 01:07 PM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  12-26-2006

first confirm a standard index.html loads with your local setup.  then i would do the above but skip step 3 and see if you can login to the admin section.  If you look closely at the exp_sites table in the dumpfile, you’ll notice a “s:XX” (where XX is some number) matched with each data entry.  I think these represent the string length of each data entry, and would need to reflect your new changes.  I too tried string replaces for all path references in the sql file but couldn’t load a migrated site.

So instead, just import the sql and load the admin page, login, and go to the admin -> system prefs -> template path.  once you update that section, you can fix the other paths (file upload, template outputs if you do them, etc.) and you should be set.

 Signature 

Fuelling CodeIgniter and ExpressionEngine from Japan

Profile
 
 
Posted: 09 May 2008 01:32 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Thanks Matt,
No love though same behavior. My front end reports error of “Error
Unable to locate the forum theme folder. “ - which I would expect since path is not correct.
Admin side still just a quick refresh of the page letting me know how long the query took.
Cleared all the cookies but it made no difference since it seems that CP is session driven...perhaps something stored in DB with respect to sessions?
downer

Profile
 
 
Posted: 09 May 2008 10:55 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  68
Joined  12-26-2006

hm, the CP should load even with an incorrect template path.  when i had this problem, it was because I had edited the sql file before importing into the local db.  if you’re doing a straight mysqldump from live and import to local, and the db encodings (latin1 vs utf8, etc.?), settings, etc. are essentially the same, then can you look in your apache / web logs to see if there’s any hint?  also confirm all folder permissions (EE’s install instructions tell you what they should be).  not sure what else to suggest.

you might want to be sure to clear all cache on the live before moving the files to local (both system/cache/… and the db should have no cache references).

 Signature 

Fuelling CodeIgniter and ExpressionEngine from Japan

Profile
 
 
Posted: 09 May 2008 11:54 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Yeah same settings on db encoding, same name of db (not that it matters as long as config.php goes along w it)...did the cache cleanup thorough CP then made sqldump...really straight forward. I tried deleting session record in db but that did nothing.All caches were deleted from ‘system\cache\db_cache’ folder that I downloaded as well...all the folders on my local machine are set to full rights by SYSTEM account.
Apache log is clean just listening on 80, php log shows:

[09-May-2008 14:11:47] PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 433 of 114166 bytes in C:\web\www\site\system\plugins\pi.magpie.php on line 1718

which also should not be a problem that I don’t have this extension loaded since it is for images....
Not sure what else to try...it would be nice to be able work offline on templates locally with at least some of the content from the live site.

Thanks again for your help and suggestions!

Profile
 
 
Posted: 09 May 2008 11:59 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  30659
Joined  05-14-2004

Moved down to technical support.

The problem you’re having is that you directly edited the database, including exp_sites which are not just plain text, they’re serialized arrays.  These are a special case, and by doing this, you’ve caused that unserialized error.

I would highly recommend doing a new dump of the database, and importing that then updating your paths.  It would be a major undertaking to fix it from this state.

 Signature 
Profile
 
 
Posted: 10 May 2008 02:17 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Hey Lisa,
Thanks for jumping in.
I have tried few dumps already directly from live (unedited) databse.
Serves me right for not developing it locally in the first place.
Thanks.

Profile
 
 
Posted: 11 May 2008 09:19 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20613
Joined  05-20-2002

OK- so using a clean backup db dump- nothing edited manually.  Correct?  The one error we’re seeing from magpie could be triggered because the cp uses magpie to pull in the EE feed in ‘news’ in the cp.  Wouldn’t expect it’s the cause of this behavior, though.  Still- I’d go in, delete system/cache and create a new cache folder- chmod writable.

You’ve definitely got the admin session type set to sessions only- might be sure it’s in the config.php

$conf['admin_session_type'] = "s";

Either of those help?

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 11 May 2008 08:06 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Hi Robin,
Yes, you are right using myPhpAdmin from the host and doing an uncompress sqldump without touching the db.
Locally I am using SQLyog (or myphpadmin packaged with WAMP doesn’t matter), creating a blank DB with the same name the the running a restore from sql dump. All the database (or so it seems) imports fine and table count is correct no errors.
The config.php (in system folder unless there is some other config file) did not have the line you posted so I added it to config. Deleted/recreated the cache folder....and sadly at the same place where I was few days ago.
Url after submitting the corrent u/p combo shows as “/index.php?S=4c44c17ba32e0890a3aae41fb6511e36fcc58c47”
so I think it is session based, no u/p submitted url foramts as “/index.php?S=0&C=login&M=auth”.
If I do a clean install locally of EE no problems. I have also re-installed the wamp server (php,mysql,apache) just in case…
Live site has no issues either.
At this point I am hpping to actually see some kind of error at lest it would give me something to work of...other than looking at the login form for backend, it goes nowhere.
Thanks again.

Profile
 
 
Posted: 12 May 2008 10:19 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20613
Joined  05-20-2002

Yep- we’re using the config to override the settings in the db.  Thus- the line wasn’t in there before.

Hm- are you using MSM and are you accessing via IP?

Also- some other config variables we can dink with.

$conf['admin_session_type'] = "c";
$conf['cookie_domain'] = ".mysite.com";
$conf['cookie_path'] = "";
$conf['cookie_prefix'] = "";
$conf['secure_forms'] = "n";
$conf['require_ip_for_login'] = "n";

Since it works fine on a fresh install, secure forms and require ip are very likely moot.  But- let’s relax all standards we can.  And make sure to specify a cookie domain- note the leading dot.  Then I’d clear all cookies and give it a try with this setup.  See if we have better luck.

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 12 May 2008 10:49 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

No MSM not by IP but hostname of http://localhost/site/system/
Adding these variables and clearning out cookies....nothing changes.
Thanks.

Profile
 
 
Posted: 12 May 2008 11:03 AM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20613
Joined  05-20-2002

Hang tight- I’m going to bump this one.

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 12 May 2008 11:35 AM   [ Ignore ]   [ # 12 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Thanks Robin,
Totally understand this is NOT an EE problem and if you guys have time I would gladly share access to live site db and files.
Thanks again!

Profile
 
 
Posted: 13 May 2008 09:36 AM   [ Ignore ]   [ # 13 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20613
Joined  05-20-2002

Yep- I talked to the crew on this one and the consensus was it’s not really doable to debug a local install as there’s just too much variability.

Just to confirm- the live site is running fine and no problems logging in?  If that’s the case, probably the best option would be to move this to ‘How to’ to kick the tires on the local install issue.  In truth, I’m about out of ideas on the EE side of things as regards the local install.

Sound good to you?  And if the live server is borking up?  That we can definitely poke some more in tech support.

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 13 May 2008 09:50 AM   [ Ignore ]   [ # 14 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Hey Robin,
Yeah live site is great and humming away. It was my attemt to move the setup and work litte faster when it came to templates and also to give me a playinground without having to re-enter and re-setup.
I do apprechiate you guys trying...personally it has trully become wtf question (excuse the lang.).
In the mean time I also tried to using EasyPHP thinking that WAMP had some issues but no joy.

Feel free to move the thread and perhaps someone else can throw in a comment if any.
If I do make any progress I will share the info. For now, I will just blame it on the “dark side of the force”...LOL ...as I am out of ideas as well.
Thanks agin for your time!!!

Profile
 
 
Posted: 13 May 2008 10:17 AM   [ Ignore ]   [ # 15 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  20613
Joined  05-20-2002

Yep- the issue doesn’t make sense to me either.  But I’ll admit, I don’t even have a local dev install set up!  I’ll shift to ‘How to’- and if you do spot the source of the weirdness, let us know.

 Signature 

AKA rob1

Help Request Tips * Pro Network

Profile
 
 
Posted: 13 May 2008 11:07 AM   [ Ignore ]   [ # 16 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  268
Joined  02-28-2008

Edit update:
OK I finally got this resolved through process that really should not make any difference but here it is.
1. installed clean version of EE locally into “databaseA” and kept all the default files(no modules, plugins, extensions - although I only had native modules Forum and Gallery on live site)
2. ran an INSERT sql /restore into separate db “databaseB”...a db from live server
3. using SQLyog ran database synch from databaseA --> databaseB (I believe this would be considered UPDATE query by SQLyog) and * excluded ‘exp_sites’ table coming from live db
4. edited ‘config.php’ where only the path and db name was changed

* what is the issue with exp_sites table coming over I still don’t know. This worked so I hope notes help others.

Thanks again for hanging in there with me!
All the best!

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 10:33 AM
Total Registered Members: 59683 Total Logged-in Users: 37
Total Topics: 71215 Total Anonymous Users: 22
Total Replies: 383826 Total Guests: 471
Total Posts: 455041    
Members ( View Memberlist )