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.

Completely borked my installation

November 29, 2010 12:10pm

Subscribe [5]
  • #1 / Nov 29, 2010 12:10pm

    mwdesign

    39 posts

    In the process of installing EE2, I’ve screwed up my earlier version of EE1—I can’t access the page, the database, or the Expression Engine control panel. I deleted EE2, and now I’m running into two problems with EE1:

    1: The main (site/index.php) page returns this error:

    Your system folder path does not appear to be set correctly. 
    Please open the following file and correct this: index.php

    I’ve corrected the path, but the error remains.

    ====

    2: The control panel (system/index.php) returns this error:

    Site Error: Unable to Load Site Preferences; 
    Invalid Preference Data

    I’ve tried reinstalling the software, but I get messages that “A prior installation appears to be already installed on this machine” and that another installation will destroy the information in the database.

    ====

    Ultimately I want to install/upgrade to EE2, but I don’t want to lose the database I was using with EE1—it’s got all my templates, posts, everything. How do I fix this?

  • #2 / Nov 29, 2010 4:32pm

    Ingmar

    29245 posts

    From what version did you start out? Do you have a pre-upgrade backup? It might be a good idea to roll back to the previous version before attempting again.

  • #3 / Nov 29, 2010 4:59pm

    mwdesign

    39 posts

    From what version did you start out?

    I believe I was using EE version 1.6.9.

     

    Do you have a pre-upgrade backup?

    Yes—but even after resorting to the backup, I’m still getting the errors.

     

    It might be a good idea to roll back to the previous version before attempting again.

    I’ve tried that, too. I installed EE 1.5.2, but I’m still getting the errors.

     

    I also did a clean install of EE 2, but when I tried to get EE 2 to use the EE 1 database, I got all sorts of table errors. So I created a new database and tried to import the EE 1 database, but I got another set of table errors.

    What’s the best course of action? How can I install/upgrade to EE2 and keep the database I was using with EE 1?

    Thanks Ingmar!

  • #4 / Nov 30, 2010 2:42am

    John Henry Donovan

    12339 posts

    mwdesign,

    I also did a clean install of EE 2, but when I tried to get EE 2 to use the EE 1 database, I got all sorts of table errors. So I created a new database and tried to import the EE 1 database, but I got another set of table errors.

    None of that is going to work.
    You need to follow our documentation here

    But first lets get your EE1.x version running again

    Can you bring your files and database all back to EE1.6.9 as you mentioned that was the version you were working off. You need the files too as any attempted upgrade will have changed files

  • #5 / Nov 30, 2010 11:29am

    mwdesign

    39 posts

    Thanks John! Okay, the version 1.6.9 files are on my server. How do I get it running again without reinstalling it, or wiping out the database?

  • #6 / Nov 30, 2010 5:31pm

    Ingmar

    29245 posts

    Did you upload a fresh set of 1.6.9 files, or a pre-update backup?

  • #7 / Nov 30, 2010 5:48pm

    mwdesign

    39 posts

    The files are the pre-update backup.

  • #8 / Dec 01, 2010 8:47am

    Sue Crocker

    26054 posts

    How about your database? Were you able to import it?

  • #9 / Dec 01, 2010 12:33pm

    mwdesign

    39 posts

    How about your database? Were you able to import it?

    Hi Sue,

    I installed EE2 (in its own separate directory) and tried importing the original database into the new EE2 database, but I got all sorts of table errors and I didn’t know how—or if—they could be resolved.

    I’ve reverted the site to its backup (I apologize for these poorly-worded sentences but I don’t know how to phrase them otherwise) so the EE1 database is there and presumably intact, but I can’t access it, the EE1 control panel, or my site.

    If I import the original database, will it maintain my templates, posts, comments, and dates?

  • #10 / Dec 02, 2010 4:22am

    John Henry Donovan

    12339 posts

    mwdesign,

    so the EE1 database is there and presumably intact

    Did you run the install wizard? If so then no it is not intact as an EE1 database

    If I import the original database, will it maintain my templates, posts, comments, and dates?

    If it is the most recent yes then it should. If worried about it make a backup of the database in its present state also.

    Can you attach here what your current index.php looks like please?

  • #11 / Dec 02, 2010 2:54pm

    mwdesign

    39 posts

    Did you run the install wizard?

    Yes. But I subsequently reverted the site and database to their backed-up versions.

    If it is the most recent yes then it should. If worried about it make a backup of the database in its present state also.

    I tried that, but I got all sorts of table errors. How do I resolve the table errors?

    Can you attach here what your current index.php looks like please?

    Here’s my index.php file:

    <?php
    /*
    =====================================================
     ExpressionEngine - by EllisLab
    -----------------------------------------------------
     <a href="http://expressionengine.com/">http://expressionengine.com/</a>
    -----------------------------------------------------
     Copyright (c) 2003 - 2009 EllisLab, Inc.
    =====================================================
     THIS IS COPYRIGHTED SOFTWARE
     PLEASE READ THE LICENSE AGREEMENT
     <a href="http://expressionengine.com/docs/license.html">http://expressionengine.com/docs/license.html</a>
    =====================================================
     File: index.php
    -----------------------------------------------------
     Purpose: Triggers the main engine
    =====================================================
    */
    
    // URI Type
    // This variable allows you to hard-code the URI type.
    // For most servers, 0 works fine.
    // 0 = auto  
    // 1 = path_info  
    // 2 = query_string
    
    $qtype = 0; 
    
    
    // DO NOT EDIT BELOW THIS!!! 
    
    error_reporting(0);
    
    if (isset($_GET['URL'])) 
    { 
        /** ---------------------------------
        /**  URL Redirect for CP and Links in Comments
        /** ---------------------------------*/
    
        $_GET['URL'] = str_replace(array("\r", "\r\n", "\n", ':',':','/','/', '
    ', '
    ', ' ', '[removed]'), 
                                   array('', '', '', ':', ':', '/', '/', '', '', '', ''), 
                                   $_GET['URL']);
        
        if (substr($_GET['URL'], 0, 4) != "http" AND ! stristr($_GET['URL'], '://') AND substr($_GET['URL'], 0, 1) != '/') 
            $_GET['URL'] = "http://".$_GET['URL']; 
            
        $_GET['URL'] = str_replace( array('"', "'", ')', '(', ';', '}', '{', 'script%', 'script&', '(', ')', '<'), 
                                    '', 
                                    strip_tags($_GET['URL']));
        
        $host = ( ! isset($_SERVER['HTTP_HOST'])) ? '' : (substr($_SERVER['HTTP_HOST'],0,4) == 'www.' ? substr($_SERVER['HTTP_HOST'], 4) : $_SERVER['HTTP_HOST']);
        
        if ( ! isset($_SERVER['HTTP_REFERER']) OR ! stristr($_SERVER['HTTP_REFERER'], $host))
        {
            // Possibly not from our site, so we give the user the option
            // Of clicking the link or not
            
            $str = "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>".
                    "To proceed to the URL you have requested, click the link below:".
                    "<a href="http://.$_GET">".$_GET['URL']."</a>\n</body>\n</html>";
        }
        else
        {
            $str = "<html>\n<head>\n<title>Redirect</title>\n".
                   '<meta http-equiv="refresh" content="0; URL='.$_GET['URL'].'">'.
                   "\n</head>\n<body>\n</body>\n</html>";
        }
        
        exit($str);
    }
    
    $uri  = '';
    $pathinfo = pathinfo(__FILE__);
    $ext  = ( ! isset($pathinfo['extension'])) ? '.php' : '.'.$pathinfo['extension'];
    $self = ( ! isset($pathinfo['basename'])) ? 'index'.$ext : $pathinfo['basename'];
    
    $path_info = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
    $query_str = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
    
    switch ($qtype)
    {
        case 0 :    $uri = ($path_info != '' AND $path_info != "/".$self) ? $path_info : $query_str;
            break;
        case 1 :    $uri = $path_info;     
            break;
        case 2 :    $uri = $query_str; 
            break;
    }
    
    unset($system_path);
    unset($config_file);
    unset($path_info);
    unset($query_str);
    unset($qstr);
    
    require 'path'.$ext;
    
    if ((isset($template_group) AND isset($template)) && $uri != '' && $uri != '/')
    {
        $template_group = '';
        $template = '';
    }
    
    if ( ! isset($system_path))
    {
        if (file_exists('install'.$ext))
        {
            header("location: install".$ext); 
            exit;
        }
        else
        {
            exit("The system does not appear to be installed. Click <a href="http://install.php">here</a> to install it.");    
        }
    }
    
    $system_path = rtrim($system_path, '/').'/';
    
    if ( ! @include($system_path.'core/core.system'.$ext))
    {
        exit("The system path does not appear to be set correctly.  Please open your path.php file and correct the path.");    
    }
    
    ?>

    And here’s my path.php file:

    <?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
    
    ?>
  • #12 / Dec 03, 2010 10:42am

    Ingmar

    29245 posts

    I tried that, but I got all sorts of table errors. How do I resolve the table errors?

    What errors, when and where? While making a backup?

  • #13 / Dec 03, 2010 7:00pm

    mwdesign

    39 posts

    The errors occurred when I tried to import the database I was using with EE v.1.6.9 into a new database I created for EE v.2.

  • #14 / Dec 05, 2010 1:52pm

    Greg Salt

    3988 posts

    Hi mwdesign,

    You can’t directly import a database from an EE 1.x installation into a EE 2.x installation. The 1.x - 2.x installer makes a significant number of changes to the database table structures and that is why this won’t work. Let’s concentrate on your original 1.x site for the moment. Please clarify the current situation; you have restored all your original files and restored your database to its pre-upgrade-attempt state? If so, what happens when you go to both your site front end and when you attempt to access your site control panel?

    Cheers

    Greg

  • #15 / Dec 05, 2010 5:14pm

    mwdesign

    39 posts

    Hi Greg,

    Please clarify the current situation; you have restored all your original files and restored your database to its pre-upgrade-attempt state?

    Yes. The database and all the files have been restored.

    what happens when you go to both your site front end and when you attempt to access your site control panel?

    Both pages show these errors:

    Site Error: Unable to Load Site Preferences; Invalid Preference Data
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases