ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Moving DB from Local to Online

October 02, 2007 6:15pm

Subscribe [3]
  • #1 / Oct 02, 2007 6:15pm

    chrigu

    21 posts

    I have almost problems when I should move the EE local DB to the EE online DB and backwards. Afterwards I have no access to CP for changing the paths and URLs.

    So I need advices, HOW and which strings I have to replace with MySQL, because I have no Ideas about “serialized objects”.

    (Moderator: Moved into Technical Support from Feature Request topic)

  • #2 / Oct 02, 2007 9:53pm

    Sue Crocker

    26054 posts

    chrigu, which build and version of EE are you working with? You can find that information at the bottom of the CP.

    Why don’t you have access to the new CP?

  • #3 / Oct 03, 2007 9:58am

    chrigu

    21 posts

    Ok, I use Build 20070622.

    I backup my online DB and import these into my local DB via phpMyAdmin so far it works. I have to change all the Paths and URL in the CP, but when I will access to CP (http://local:8888/system/index.php) there I have the Login Page but without any CSS styles. If I will get in with my Username and Password there’s nothing happens except the URL change to “http://local:8888/system/index.php?S=8e38205244586d6bddc0d868ff2cb41f0d5c9f1d”.

  • #4 / Oct 03, 2007 11:40am

    Robin Sowell

    13255 posts

    You don’t want to muck with the serialized arrays directly.  The best way to handle this is to override the db configurations by editing the system/config.php file.  You may need to go in and change the security settings and perhaps the cookie settings- and perhaps the path settings to the themes folder if you want things styled.  Then, once you can log in, set all of the settings via the control panel- thus changing them in the db- and you can then remove them from the config.

    The overrides I’d start with are:

    $conf['cp_url'] = "http://mysite.com/system/index.php";
    $conf['theme_folder_url'] = "http://mysite.com/themes/";
    $conf['cookie_domain'] = ".mysite.com";
    $conf['admin_session_type'] = "c";

    To login, be sure your cookie_domain is correct- and don’t forget the beginning . - you may need to switch the admin_session_type between cookies- c - and sessions - s .  Once you set your config variables, clear your cookies and try logging in again.

  • #5 / Oct 03, 2007 3:16pm

    chrigu

    21 posts

    It did the job, thank you. I had to add also the $conf[‘theme_folder_path’] Variable for get the CP styled.

    Are there more $conf[] Variables for config.php? Especially Paths and URL Variables, so I could make two config.php files for Local EE and Online EE?

  • #6 / Oct 03, 2007 3:18pm

    Lisa Wess

    20502 posts

    Sure are, you can find them from the 1.5.1 config.php =)

  • #7 / Oct 05, 2007 8:05am

    chrigu

    21 posts

    It seems that EE will not write cookies on my Local EE Installation (btw. MAMP 1.6). So $conf[‘admin_session_type’] = “c”; and $conf[‘admin_session_type’] = “cs”;  will not work only $conf[‘admin_session_type’] = “s”; . I set Firefox to ask for adding cookies, on Online EE there I get asked on Local EE there’s no question.

    I checked the settings in config.php

    $conf['cp_url'] = "http://pixelmania_ee/[edited]/index.php";
    $conf['cookie_domain'] = ".pixelmania_ee";
    $conf['admin_session_type'] = "s";
    $conf['user_session_type'] = "c";

    I think there should no issue. I need cookies for access member only templates, have you any ideas for debug this issue or such a solution?

  • #8 / Oct 05, 2007 4:52pm

    Derek Allard

    3168 posts

    I’ve edited out your system folder in case that was the real one.  For local, you’ll need to change the cookie_domain to reflect that (probably “localhost”), but you might get away with simply removing cookie_domain entirely.  You’ll also need to update your cp_url for localhost.  If you are using a modified hosts file, or some other trickery to re-point your local dev environment, then its probably worth focusing on the site dev for now, and getting the session and cookie stuff working once on the live server.

  • #9 / Oct 05, 2007 7:04pm

    chrigu

    21 posts

    If you are using a modified hosts file, or some other trickery to re-point your local dev environment, then its probably worth focusing on the site dev for now, and getting the session and cookie stuff working once on the live server

    I forgot perhaps some explanations. I did two config.php files, one for the devsite and one for the live server, in mind that I have only move my DB between dev and live server without any additonal configuration in the CP.

    So I ask me why does EE not write Cookies on my local site? For cookie_domain I use “.pixelmania_ee” and my modified host file of my localhost contains exactly the same domain:

    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##
    127.0.0.1       localhost
    127.0.0.1       pixelmania
    127.0.0.1       pixelmania_ee
    
    255.255.255.255 broadcasthost
    ::1             localhost
  • #10 / Oct 08, 2007 12:37pm

    Derek Allard

    3168 posts

    This is almost certainly a hosts issue.  Does it work on your remote site?  I’m not familiar enough with specific Apache setup to be able to comment on it much more in depth.  What happens if you leave cookie domain empty?

  • #11 / Oct 22, 2007 5:05am

    chrigu

    21 posts

    Hi, sorry this post a little bit…

    It seems that it works on my localhost (MAMP), if I let the cookie domain empty

    $conf['cookie_domain'] = "";

    If I have time, i will go perhaps more into the apache setup but im not sure if it has something with this.

    Greets

  • #12 / Oct 22, 2007 9:09am

    Derek Allard

    3168 posts

    Great news.  Glad to hear its working Chris.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases