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.

Upgrading from EE1 to EE2 : "Your system folder path does not appear to be set correctly"

September 05, 2011 8:00am

Subscribe [5]
  • #1 / Sep 05, 2011 8:00am

    Antenna

    87 posts

    Hi,

    I am attempting to do 2 things:

    1. move existing 1.x site to a new domain
    2. then upgrade it to 2.x

    The first part went ok, everything seemed to up and running fine, so I then starting following this tutorial:

    Upgrading from 1.x to 2.x

    I got up to part 6 of the tutorial, but hit this error when trying point my browser to admin.php :

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

    I’m guessing the fact that I had renamed the ‘system’ directory on the EE1 version of the site might be something to do with this (or the fact that the site is now on a different domain name)?


    Things I’ve tried/checked:

    • in admin.php : $system_path = ‘./system’;

    • in path.php : $system_path = “./system/”;

    • in index.php : $system_path = “./system/”;

    • in system/index.php : $system_path = “”;

    • in system/config/config.php : $conf[‘system_folder’] = “system”;
      and I edited $conf[‘cp_url’] to contain the new domain name

    • removed the .htaccess file (which I used to remove ‘index.php’ from my urls on the EE1 version of the site)

    ...not sure what else to try. Any help would be greatly appreciated.

    Many thanks,

    Andy

  • #2 / Sep 05, 2011 9:51am

    Lee Powell

    88 posts

    I’m guessing your system directory is indeed named ‘system’ by your examples?

    I’m also guessing you have the system directory in the same directory as admin.php like so:

    admin.php
    ...
    index.php
    /system/

    You should only need to be editing the admin.php file though…

    Can you confirm the above?

  • #3 / Sep 05, 2011 11:15am

    Antenna

    87 posts

    Thanks for your response, Lee.

    Yes, the system directory is called ‘system’ at present.

    And ‘admin.php’, ‘index.php’ and the ‘system’ directory are all in the same directory.

  • #4 / Sep 05, 2011 11:19am

    Lee Powell

    88 posts

    Any chance you could post your admin.php file so we can check there’s nothing wrong with it?

  • #5 / Sep 05, 2011 11:23am

    Antenna

    87 posts

    Here’s part one (it’s too long for the character limit to show in one hit)...

    <?php
    /**
     * ExpressionEngine - by EllisLab
     *
     * @package        ExpressionEngine
     * @author        ExpressionEngine Dev Team
     * @copyright    Copyright (c) 2003 - 2011, EllisLab, Inc.
     * @license        <a href="http://ellislab.com/expressionengine/user-guide/license.html">http://ellislab.com/expressionengine/user-guide/license.html</a>
     * @link        <a href="http://expressionengine.com">http://expressionengine.com</a>
     * @since        Version 2.0
     */
    
    /*
     * --------------------------------------------------------------------
     *  System Path
     * --------------------------------------------------------------------
     *
     * The following variable contains the server path to your
     * ExpressionEngine "system" folder.  By default the folder is named
     * "system" but it can be renamed or moved for increased security.
     * Indicate the new name and/or path here. The path can be relative
     * or it can be a full server path.
     *
     * <a href="http://ellislab.com/expressionengine/user-guide/installation/best_practices.html">http://ellislab.com/expressionengine/user-guide/installation/best_practices.html</a>
     * 
     */
        $system_path = './system';
    
    
    /*
     * --------------------------------------------------------------------
     *  Multiple Site Manager
     * --------------------------------------------------------------------
     *
     * Uncomment the following variables if you are using the Multiple
     * Site Manager: <a href="http://ellislab.com/expressionengine/user-guide/cp/sites">http://ellislab.com/expressionengine/user-guide/cp/sites</a>
     *
     * The variables set the Short Name of the site this admin.php file
     * will log into, and its URL.
     *
     */
    //    $assign_to_config['site_name']  = 'domain2_short_name';
    //    $assign_to_config['cp_url'] = 'http://domain2.com/admin.php';
    
    
    /*
     * --------------------------------------------------------------------
     *  Error Reporting
     * --------------------------------------------------------------------
     *
     * PHP and database errors are normally displayed dynamically based
     * on the authorization level of each user accessing your site.  
     * This variable allows the error reporting system to be overridden, 
     * which can be useful for low level debugging during site development, 
     * since errors happening before a user is authenticated will not normally 
     * be shown.  Options:
     *
     *    $debug = 0;  Default setting. Errors shown based on authorization level
     *
     *    $debug = 1;  All errors shown regardless of authorization
     *
     * NOTE: Enabling this override can have security implications.
     * Enable it only if you have a good reason to.
     * 
     */
        $debug = 1;
    
    /*
     * --------------------------------------------------------------------
     *  END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
     * --------------------------------------------------------------------
     */
    
    
        define('MASKED_CP', TRUE);
    
    /*
     * --------------------------------------------------------------------
     *  Mandatory config overrides
     * --------------------------------------------------------------------
     */
        $assign_to_config['enable_query_strings'] = TRUE;
        $assign_to_config['subclass_prefix'] = 'EE_';
        $assign_to_config['directory_trigger'] = 'D';    
        $assign_to_config['controller_trigger'] = 'C';    
        $assign_to_config['function_trigger'] = 'M';
    
    /*
     * --------------------------------------------------------------------
     *  Resolve the system path for increased reliability
     * --------------------------------------------------------------------
     */
        if ($system_path == '')
        {
            $system_path = pathinfo(__FILE__, PATHINFO_DIRNAME);
        }
    
        if (realpath($system_path) !== FALSE)
        {
            $system_path = realpath($system_path).'/';
        }
        
        // ensure there's a trailing slash
        $system_path = rtrim($system_path, '/').'/';
    
    /*
     * --------------------------------------------------------------------
     *  Now that we know the path, set the main constants
     * --------------------------------------------------------------------
     */    
        // The PHP file extension
        define('EXT', '.php');
        
        // The name of THIS file
        define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
    
         // Path to the system folder
        define('BASEPATH', str_replace("\\", "/", $system_path.'codeigniter/system/'));
        
        // Path to the front controller (this file)
        define('FCPATH', str_replace(SELF, '', __FILE__));
        
        // Name of the "system folder"
        define('SYSDIR', trim(strrchr(trim(str_replace("\\", "/", $system_path), '/'), '/'), '/'));
    
        // The $debug value as a constant for global access
        define('DEBUG', $debug);  unset($debug);
  • #6 / Sep 05, 2011 11:24am

    Antenna

    87 posts

    Part 2…

    /*
    * --------------------------------------------------------------------
     *  EE Control Panel Constants
     * -------------------------------------------------------------------
     *
     * If the "installer" folder exists the $config['install_lock'] is off
     * we will load the installation wizard.  Otherwise we load the CP
     *
     */ 
         // Is the installation folder present?
        if (is_dir($system_path.'installer/'))
        {
            // We need a different subclass prefix when we run the installer.
            // The reason is because the installer has it's on Config class extension
            // containing some specific functions needed by the installer.  By 
            // setting a unique prefix we can also load the main Config class extension
            // without a naming conflict
            $assign_to_config['subclass_prefix']    = 'Installer_';
            
            // This allows the installer application to be inside our normal EE application directory
            define('APPPATH', $system_path.'installer/');
            define('EE_APPPATH', $system_path.'expressionengine/');
        }
        else
        {
            define('APPPATH', $system_path.'expressionengine/');
        }
    
         // The control panel access constant.  Without this, the CP will not be invoked
        define('REQ', 'CP');
    
    /*
     * --------------------------------------------------------------------
     *  Set the error reporting level
     * --------------------------------------------------------------------
     */    
        if (DEBUG == 1)
        {
            error_reporting(E_ALL);
            @ini_set('display_errors', 1);
        }
        else
        {
            error_reporting(0);    
        }
    
    
    /*
     *---------------------------------------------------------------
     * LOAD THE BOOTSTRAP FILE
     *---------------------------------------------------------------
     *
     * And away we go…
     *
     */
        // Is the system path correct?
        if ( ! file_exists(BASEPATH.'core/CodeIgniter'.EXT))
        {
            exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));    
        }
    
        require_once BASEPATH.'core/CodeIgniter'.EXT;
    
    
    /* End of file index.php */
    /* Location: ./system/index.php */
  • #7 / Sep 06, 2011 1:07pm

    Kyle Cotter

    730 posts

    Hey Antenna,

    The admin.php file looks okay to me.

    Can you copy system/expressionengine/utilities/dbtest.php into your root. Edit the settings inside the file and view it through your browser, and let me know what shows up? This way we can rule out anything dealing with the database as the issue. (Just in case something funky happened during the update)

    Thanks! And thanks for the help Lee!

  • #8 / Sep 06, 2011 1:13pm

    Antenna

    87 posts

    Hi Kyle,

    Thanks for your reply. I’m probably being a bit thick, but I’m not quite sure what to enter for:

    $hostname   = “YOUR_HOSTNAME”;

    can you advise please?

  • #9 / Sep 06, 2011 1:23pm

    Kyle Cotter

    730 posts

    Hey Antenna,

    Typically $hostname should be ‘localhost’. What we’re doing is making sure the DB can connect okay. So, whatever settings you used to setup your EE install, should go in the variables in dbtest.php.

    Does that clear it up?

    Thanks.

  • #10 / Sep 06, 2011 1:28pm

    Antenna

    87 posts

    Thanks Kyle,

    This is the message I’m getting when visiting that through my browser:

    Unable to connect to your database server

    Unable to select your database

    ...uh-oh!

  • #11 / Sep 07, 2011 11:50am

    Mark Bowen

    12637 posts

    Hi Andy,

    That message means that there may be something wrong with the credentials that were supplied in the dbtest.php file.

    You said that you had moved this site across from 1.x to 2.x

    If you take a look in your system > config.php file in your 1.x install then you should find the information you need in order to make the dbtest.php file work in this instance.

    Could you try that for us please and let us know how you get on.

    Thanks.

    Mark

  • #12 / Sep 07, 2011 12:06pm

    Antenna

    87 posts

    Aha! Thanks Mark - yup, I entered the wrong $hostname. Silly me.

    Anyhow, I’m now getting this message when viewing dbtest.php in my browser:

    A connection was established to your database server

    Your database was selected.

    ...which seems like good news to me! Any ideas what I can try next to solve my “Your system folder path does not appear to be set correctly” woes?

    Many thanks.

  • #13 / Sep 07, 2011 12:30pm

    Lee Powell

    88 posts

    Antenna - could you try the following for me - in the admin.php file change the following:

    if ( ! file_exists(BASEPATH.'core/CodeIgniter'.EXT))
    {
            exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));    
    }

    to

    echo BASEPATH.'core/CodeIgniter'.EXT; die;
    
    if ( ! file_exists(BASEPATH.'core/CodeIgniter'.EXT))
    {
            exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));    
    }

    This should output the full path to the CodeIgniter file we need to run…

    Once done, make a note of the path shown, and revert the code back to what it was.

  • #14 / Sep 07, 2011 12:36pm

    Antenna

    87 posts

    Thanks Lee. Done that - do you need to see the path?

  • #15 / Sep 07, 2011 12:38pm

    Lee Powell

    88 posts

    Yes, can do - does it look correct to you of where the system folder and CodeIgniter.php file resides?

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

ExpressionEngine News!

#eecms, #events, #releases