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.

unable to get localhost copy of ee 1.6.8 site working on localhost

December 14, 2010 2:56pm

Subscribe [4]
  • #1 / Dec 14, 2010 2:56pm

    martinduys

    3 posts

    I’ve been struggling for weeks to get a localhost version of a live site to work and am at my wits end. I inherited the site from a previous developer and have had no prior exposure to EE.

    I have XAMPP and have created a vhost called ‘giltedge’. The version of EE I have is 1.6.8.

    The site has been working but I couldn’t get the images to display. This morning I was VERY excited because I made a change to the config.php file and the images were now displaying. BUT when I tried to log into the cpanel I was shown a blank screen with a 0 value for the s variable and a 0 value for, I think it is, the c variable.

    My config.php file looks like this:

    <?php
    
    if ( ! defined('EXT')){
    exit('Invalid file request');
    }
    
    $conf['app_version']            = "168";
    $conf['license_number']         = "8760-9739-8510-5085";
    $conf['debug']                  = "1";
    $conf['install_lock']           = "1";
    $conf['db_hostname']            = "localhost";
    $conf['db_username']            = "###########";
    $conf['db_password']            = "##############";
    $conf['db_name']                = "###############";
    $conf['db_type']                = "mysql";
    $conf['db_prefix']              = "ge";
    $conf['db_conntype']            = "0";
    
    $conf['doc_url']                = "http://expressionengine.com/docs/";
    $conf['cookie_prefix']          = "";
    $conf['is_system_on']           = "y";
    $conf['allow_extensions']       = "y";
    $conf['multiple_sites_enabled'] = "n";
    $conf['admin_session_type']     = "s";  
    
    // Paths and URLs
    $conf['system_folder']          = "system";
    $conf['rel_path']               = "";
     
    // paths
    $conf['site_url']               = "http://${_SERVER['HTTP_HOST']}/${conf['rel_path']}";
    $conf['cp_url']   = "http://giltedge/system/index.php"
    //$conf['cp_url']                 = "${conf['site_url']}/${conf['system_folder']}/index.php";
     
    // template files
    $conf['tmpl_file_basepath']     = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}resources/templates";
     
    // themes
    $conf['theme_folder_path']      = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}themes";
    $conf['theme_folder_url']       = "${conf['site_url']}/themes";
     
    // capchas
    $conf['captcha_path']           = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}images/captchas";
    $conf['captcha_url']            = "${conf['site_url']}/images/captchas";
     
    // avatars
    $conf['avatar_path']            = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}images/members/avatars";
    $conf['avatar_url']             = "${conf['site_url']}/images/members/avatars";
     
    // photos
    $conf['photo_path']             = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}images/members/photos";
    $conf['photo_url']              = "${conf['site_url']}/images/members/photos";
    
    // fieldframe
    $conf['ft_path']                = "${_SERVER['DOCUMENT_ROOT']}/${conf['rel_path']}${conf['system_folder']}/extensions/fieldtypes/";
    $conf['ft_url']                 = "${conf['site_url']}/${conf['system_folder']}/extensions/fieldtypes/";
    
    $conf['ip2nation']              = "n";
    ?>

    And my path file (which looks suspicious to me) looks like this:

    <?php
    
    // ------------------------------------------------------
    // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
    
    // ------------------------------------------------------
    // Path to the directory containing your backend files
    
    $system_path = "./system/";
    
    // ------------------------------------------------------
    // MANUALLY CONFIGURABLE VARIABLES
    // See user guide for more information
    // ------------------------------------------------------
    
    $template_group = "";
    $template = "";
    $site_url = "";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(); // This array must be associative
    if ($_SERVER["HTTP_HOST"] == "giltedge") {
        $global_vars['environment'] = "dev";
    }else{
        $global_vars['environment'] = "live";
        
    }
    
    if (($_SERVER["HTTP_HOST"] == "giltedgeafrica.net")OR
        ($_SERVER["HTTP_HOST"] == "www.giltedgeafrica.net")OR
        ($_SERVER["HTTP_HOST"] == "gilt-edge.com")) {
        header("Location: <a href="http://www.gilt-edge.com/">http://www.gilt-edge.com/"</a>);
        exit;
    }
    ?>

    I would really appreciate some help on this.

  • #2 / Dec 15, 2010 4:21am

    John Henry Donovan

    12339 posts

    martinduys,

    Ok it looks like your previous developer had a specific setup which he could switch quickly between dev and live configurations.

    Regarding your cp blank page. Can you enable Error Reporting and see if you can return any suppressed errors

  • #3 / Dec 20, 2010 3:26am

    martinduys

    3 posts

    I have turned on error reporting and am getting the following error:

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\giltedge\system\core\core.system.php:1) in C:\xampp\htdocs\giltedge\system\core\core.functions.php on line 723
  • #4 / Dec 20, 2010 5:55pm

    Ingmar

    29245 posts

    Can you please try to load up a fresh set of files? You might want to upgrade to EE 1.7. while you’re at it.

  • #5 / Dec 24, 2010 3:56am

    martinduys

    3 posts

    I’ve redownloaded everything and have exactly the same problem.
    My images which are in \images\uploads are still not displaying. When I open an example of a broken image in a new tab the image path shows as:

    <a href="http://giltedge.net/CapeTown__Safari_preview1_4.jpg">http://giltedge.net/CapeTown__Safari_preview1_4.jpg</a>

    when it should be:

    <a href="http://giltedge.net/images/uploads/toursPreviewImage/Scorecard_preview1.jpg">http://giltedge.net/images/uploads/toursPreviewImage/Scorecard_preview1.jpg</a>

    When I try and log in to the control panel, the login screen is not styled and Error reporting still says at the top of the login page:

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\giltedge.net\system\core\core.system.php:1) in C:\xampp\htdocs\giltedge.net\system\core\core.functions.php on line 723

    Line 723 is something to do with setting the cookie:

    setcookie($prefix.$name, $value, $expire, $path, $domain, 0);

    I am using a simpler config file which looks like this (excluding the database stuff):

    $conf['cookie_prefix'] = "";
    $conf['is_system_on'] = "y";
    $conf['allow_extensions'] = "y";
    $conf['multiple_sites_enabled'] = "n";
    
    $conf['system_folder'] = "system";
    $conf['rel_path'] = "";
    $conf['site_url'] = "http://giltedge.net/";
    $conf['cp_url'] = "http://giltedge.net/system";
    $conf['tmpl_file_basepath'] = "C:\xampp\htdocs\giltedge.net\system\templates";
    $conf['theme_folder_path'] = "C:\xampp\htdocs\giltedge.net\themes";
    $conf['theme_folder_url'] = "http://giltedge.net/themes";
    $conf['captcha_path'] = "C:\xampp\htdocs\giltedge.net\images\captchas";
    $conf['captcha_url'] = "http://giltedge.net/captchas";
    $conf['avatar_path'] = "C:\xampp\htdocs\giltedge.net\images\members\avatars";
    $conf['avatar_url'] = "http://giltedge.net/images/members/avatars";
    $conf['photo_path'] = "C:\xampp\htdocs\giltedge.net\images\members\photos";
    $conf['photo_url'] = "http://giltedge.net/images/members/photos";
    $conf['ft_path'] = "C:\xampp\htdocs\giltedge.net\system\extensions\fieldtypes";
    $conf['ft_url'] = "http://giltedge.net/system/extensions/fieldtypes/";
    $conf['ip2nation'] = "n";
    
    $conf['enable_online_user_tracking'] = "n";
    $conf['enable_hit_tracking'] = "n";
    $conf['enable_entry_view_tracking'] = "n";
    $conf['dynamic_tracking_disabling'] = "";

    So, redownloading doesn’t seem to have helped.

    I ma pretty convinced that the issue is something to do with my config file and would really appreciate someone having a careful look at it.

    I’d love to upgrade to 1.7 and see if that helps. Are there instructions somewhere on how to do it?

  • #6 / Dec 27, 2010 3:16pm

    Brandon Jones

    5500 posts

    Hi martinduys,

    Check your config.php and database.php files and make sure there are no blank lines at the beginning. Also, do go ahead and upgrade to 1.7 to ensure we’re working with a fresh set of files. Keep us posted!

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

ExpressionEngine News!

#eecms, #events, #releases