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.

Problem moving EE site

August 04, 2010 12:54pm

Subscribe [6]
  • #1 / Aug 04, 2010 12:54pm

    barryparr

    125 posts

    I’m trying to set a development copy of my ee site running under MAMP on my Macbook.  I’ve followed the instructions in the docs for moving a site.

    * I’ve made a copy of my EE database under MAMP using phpmyadmin

    * I’ve copied all the files form my EE installation on Enginehosting to my local MAMP directory, and fixed the permissions.

    * I’ve modified the config.php file in the MAMP directory to reflect that setup.

    When I try to log in, the cp login page has no formatting and it doesn’t recognize my login, although I can see the admin account in the member table.

    When I try to got to the site, I get this:

    Deprecated: Function ereg() is deprecated in /Applications/MAMP/htdocs/index.php on line 114
    Error

    Unable to locate the forum theme folder.

    I assume that the forum theme problem has to do with me not having corrected the path in the cp, but I have thought the deprecated function might be significant.

    I just installed MAMP, so it’s the latest version, using:

    Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2
    MySQL client version: 5.1.44

    ...and I’m running EE 1.6.9

  • #2 / Aug 04, 2010 1:13pm

    barryparr

    125 posts

    I just realized: When I put in a valid admin login, EE just returns to the login page.  When I use an invalid login, it tells me that the login’s not valid, so it is reading the member file, but it’s not going to the cp.

  • #3 / Aug 04, 2010 7:52pm

    Brandon Jones

    5500 posts

    Hi Barry,

    You can override the theme folder server path with the correct one via config.php:

    $conf['theme_folder_path'] = '...';

    Once correct you should see styling in the CP again.

    Then, the login issue is likely a cookie domain mismatch. You can get around this temporarily by using sessions only. Again in config.php add:

    $config['user_session_type'] = "s";

    Once in, you can submit the proper cookie domain and theme folder path and remove the above config overrides.

  • #4 / Aug 04, 2010 8:05pm

    barryparr

    125 posts

    Thanks for the suggestion. It’s still not working.

    I’m now getting a blank page instead of the login page at http://localhost:8888/system/index.php

    I’m no longer getting the error message on the site itself, but still getting the deprecation message:

    Deprecated: Function ereg() is deprecated in /Applications/MAMP/htdocs/index.php on line 114

    Here’s my config file now, replaced values in {braces}:

    <?php
    
    if ( ! defined('EXT')){
    exit('Invalid file request');
    }
    
    $conf['app_version'] = "169";
    $conf['license_number'] = "{number}";
    $conf['debug'] = "0";
    $conf['install_lock'] = "1";
    $conf['db_hostname'] = "localhost";
    $conf['db_username'] = "{name}";
    $conf['db_password'] = "{pw}";
    $conf['db_name'] = "db";
    $conf['db_type'] = "mysql";
    $conf['db_prefix'] = "exp";
    $conf['db_conntype'] = "0";
    $conf['enable_db_caching'] = "n";
    $conf['enable_sql_caching'] = "n";
    $conf['system_folder'] = "ee_cms";
    $conf['cp_url'] = "http://localhost:8888/{system}/index.php";
    $conf['doc_url'] = "http://expressionengine.com/docs/";
    $conf['is_system_on'] = "y";
    $conf['allow_extensions'] = "y";
    $conf['forum_is_installed'] = "y";
    $conf['multiple_sites_enabled'] = "n";
    $conf['ip2nation'] = "y";
    $conf['cookie_prefix'] = "";
    
    $conf['theme_folder_path'] = 'http://localhost:8888/themes/'; 
    $conf['user_session_type'] = "s"; 
    
    
    ?>
  • #5 / Aug 04, 2010 8:12pm

    Brandon Jones

    5500 posts

    theme_folder_path should be an absolute server path, not a URL. For example:

    $conf['theme_folder_path'] = "/Users/Barry/Sites/ee21/themes/"

    For debugging, I’d also recommend:

    $conf['allow_extensions'] = "n";

    Furthermore, this might just be a function of how you’re pasting the code into the forums, but what you provided has “fancy” single and double quotes. You’ll want to make sure that’s not the case and that you’re using plain quotes.

    Keep us posted.

  • #6 / Aug 04, 2010 8:20pm

    barryparr

    125 posts

    The quotes were fine. I had marked it as a quote and not as code.

    I fixed the path and added the code, but still no luck:

    $conf['theme_folder_path'] = "/Applications/MAMP/htdocs/themes/" 
    $conf['user_session_type'] = "s"; 
    $conf['allow_extensions'] = "n";
  • #7 / Aug 05, 2010 12:37am

    Lisa Wess

    20502 posts

    Can you try uploading a new copy of index.php for both / and /system?  That may help out here.

    Do you have any other installs on your localhost?  If so, you may need a cookie prefix to get logged in.

    You might also try moving themes/cp_themes inside /system, and see if that gives you some CSS.  If so, there may be an open_basedir restriction in effect, though I don’t believe that’s on by default in MAMP. I’m not 100% sure there.

  • #8 / Aug 05, 2010 9:22am

    carvingCode

    380 posts

    Any chance you did a search/replace om your database prior to importing into your localhost site?  If you did, you probably borked the ‘exp_sites’ table (Lisa gave me the lowdown on this when I recently did this.)

    The results you are getting (not recognizing your login and redirecting to the login form) are exactly what I experienced recently after doing this.

  • #9 / Aug 05, 2010 7:17pm

    Brandon Jones

    5500 posts

    Barry, let us know how you’re progressing.

  • #10 / Aug 07, 2010 4:23pm

    barryparr

    125 posts

    I still can’t get this to work.

    To recap: I get an unformatted login page when I go to http://localhost/system/index.php [I’ve changed MAMP so that I don’t need port 8888 any longer].  When I input an invalid account, it’s recognized as invalid. when I use a valid admin account, it just returns to the empty login page. So, it seems to have access to my member database, but can’t get to the cp.

    Answers to other questions:

    * I tried new copies of the index.php files

    * I don’t have any other installs in localhost

    * I didn’t edit the db export file

    New Information:

    * Installing EE from scratch works fine.  But, of course, I need working copy of my production site.

    Here’s my config.php file:

    <?php
    
    if ( ! defined('EXT')){
    exit('Invalid file request');
    }
    
    $conf['app_version'] = "169";
    $conf['license_number'] = "----";
    $conf['debug'] = "0";
    $conf['install_lock'] = "1";
    $conf['db_hostname'] = "localhost";
    $conf['db_username'] = "----";
    $conf['db_password'] = "----";
    $conf['db_name'] = "----";
    $conf['db_type'] = "mysql";
    $conf['db_prefix'] = "exp";
    $conf['db_conntype'] = "0";
    $conf['enable_db_caching'] = "n";
    $conf['enable_sql_caching'] = "n";
    $conf['system_folder'] = "ee_cms";
    $conf['cp_url'] = "http://localhost/system/index.php";
    $conf['doc_url'] = "http://expressionengine.com/docs/";
    $conf['is_system_on'] = "y";
    $conf['allow_extensions'] = "y";
    $conf['forum_is_installed'] = "y";
    $conf['multiple_sites_enabled'] = "n";
    $conf['ip2nation'] = "y";
    $conf['cookie_prefix'] = "";
    
    ?>

    When I add any of the following to the config file, I get a blank login page:

    $conf['theme_folder_path'] = "/Applications/MAMP/htdocs/themes/" 
    $conf['user_session_type'] = "s"; 
    $conf['allow_extensions'] = "n"; 
  • #11 / Aug 08, 2010 3:06pm

    Greg Salt

    3988 posts

    Hi Barry,

    Is your system folder called ‘system’ or ‘ee_cms’? Your config file has these two lines in, which seem incorrect:

    $conf['system_folder'] = "ee_cms";
    $conf['cp_url'] = "http://localhost/system/index.php";

    Cheers

    Greg

  • #12 / Aug 08, 2010 3:47pm

    barryparr

    125 posts

    I’ve changed the system folder to ee_cms. It’s consistent in the actual config.php, but I neglected to change all instances in the sample I posted. Sorry.  Good catch, though.

  • #13 / Aug 09, 2010 2:30am

    John Henry Donovan

    12339 posts

    Barry,

    Can you set your extensions to off for the present and see if that makes a difference

    $conf['allow_extensions'] = "n";
  • #14 / Aug 09, 2010 11:52am

    barryparr

    125 posts

    Thanks, but turning off extensions has already been suggested and tried. But trying it again brought out an odd symptom.

    When I added that line (and a couple of others) earlier, I got a blank screen instead of the admin login. This time I got the (nonworking) admin login after adding the line.

    Looks like you guys are helping someone else with this same problem, but a different setup (2.1 and a changed dns): http://ellislab.com/forums/viewthread/162965/

  • #15 / Aug 09, 2010 10:07pm

    Brandon Jones

    5500 posts

    Hi Barry,

    There was a copy and paste error in one my previous posts. Instead of forcing user_session_type in config.php, that line should be:

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

    If that still doesn’t let you in, try “c” instead of “s”, and also add this line:

    $conf['cookie_domain'] = ".localhost";

    Also you can try with cookie_domain set to “” (blank).

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

ExpressionEngine News!

#eecms, #events, #releases