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 change config.php. Can't login to accept changes, so unable to update EE

December 10, 2011 6:55am

Subscribe [4]
  • #1 / Dec 10, 2011 6:55am

    NKT com

    124 posts

    I’m trying to upgrade from version 2.2.2 to 2.3.1. My update went wrong and I found the reason why but i’m unable to fix it. My config.php files keeps resetting itself to only contain this…

    <?php if ( ! defined('BASEPATH')) exit('Invalid file request');
    
    $config['protect_javascript'] = "n";
    $config['app_version'] = "0";
    ?>

    Which the upgrade script doesn’t like of course.

    Every time I replace it with a valid backup of that file it reverts itself. I know that as a security measure I normally need to approve config.php changes via the admin interface but as i’ve uploaded all the upgraded files I can not access the admin panel (just the upgrade screens).

    How can I approve the config.php change without admin area access?

     

  • #2 / Dec 12, 2011 10:46am

    NKT com

    124 posts

    Any ideas? My site has been down for quite a long time now.

  • #3 / Dec 12, 2011 10:49am

    Kevin Smith

    4784 posts

    Hi NKT com,

    I’m sorry to see you’re having issues with your upgrade. Let me see what I can do to help.

    Actually, you only have to approve changes in your main index.php file, not your config.php file. That shouldn’t have an effect here either way.

    It does look like the upgrade wizard may be having an issue with your config.php file though. Is there any way you could post the contents of your config.php file (just the top part before // END EE config items and any changes you’ve made beyond that line)? Please block out any sensitive parts of it if you would.

    Also, when you say your update went wrong, to what are you referring specifically? Did the upgrade wizard choke at some point and just stop? What exactly did you see happen? If there were any error messages, what were they?

    Check out this page on troubleshooting upgrade errors and let me know if this helps you along at all.

  • #4 / Dec 12, 2011 12:25pm

    NKT com

    124 posts

    Hi Kevin,

    here is the file with xxxx in the sensitive places.

    http://dl.dropbox.com/u/497583/config.txt

    You can see my thread here on the update going wrong. I track it down to this error.

    http://ellislab.com/forums/viewthread/205888/

  • #5 / Dec 12, 2011 2:56pm

    Dan Decker

    7338 posts

    Now that we are all on the same page here…

    Is that the condition of your config.php *before* you attempt the update process (as it appears in the attached file)? Can you verify that the permission on this file are set to 666 before you run the update script? Have you followed all the procedures outlined in Updateing ExpressionEngine, making use to set the site to an online status?

    Thanks!

  • #6 / Dec 22, 2011 3:35am

    NKT com

    124 posts

    Hi Dan,

    yes the files I posted is the condition of the files before attempting the update process. The one at the top of the thread is what happens to the file after I’ve reached this screen.

    The scripts permissions are 666 and the site was taken offline before attempting to update.

  • #7 / Dec 23, 2011 3:59pm

    Dan Decker

    7338 posts

    NKT com,

    Would it be possible to get a look at this? Be on the lookout for an email form me.

    Cheers,

  • #8 / Jan 03, 2012 4:32am

    NKT com

    124 posts

    Hi Dan,

    Thanks for checking this out. I’ve sent the login details.

    Our server is SFTP only so I sent the cPanel login details. If you login to file manager you will see a folder for you with SFTP details if you need them.

    I’ve backed up the whole site and restored it to the state before it breaks. If you access the admin area and run the update you will see config.php will get overwritten and then the error.

  • #9 / Jan 03, 2012 8:51pm

    Dan Decker

    7338 posts

    Hi all,

    Just a note to let everyone know that we are working with NKT com behind the scenes and will post the solution here when we have this resolved.

  • #10 / Jan 05, 2012 2:37pm

    Dan Decker

    7338 posts

    Hi NKT com,

    I was able to get the update to push through. You are now running ExpressionEngine 2.3.1 and the site is back online. Let me know if you need anything else.

    Cheers!

  • #11 / Feb 21, 2012 5:50pm

    ianryde

    112 posts

    Hi there,

    I am also having this problem with an update from 2.31 to 2.4.

    How did you guys fix this?

    Thanks,
    Ian

  • #12 / Feb 24, 2012 2:09pm

    Dan Decker

    7338 posts

    Hi Ian,

    I’m sorry you are having trouble getting your ExpressionEngine install up-to-date!

    Each instance can be unique. It would be helpful if you could describe the process thus far.

    What errors are you seeing? What have you tried up to this point? What third-party add-ons do you have installed?

    Have you been through the steps for Troubleshooting a Failed Update?

    Be as detailed as possible in your response and I will do my best to get you up and running!

    Cheers,

  • #13 / Feb 27, 2012 9:37am

    ianryde

    112 posts

    Hi there,

    Thanks for your reply. I am trying to update from 2.3.1, to 2.4.0.

    Everything seems fine until I click install and it seems to think it is the public beta version, and goes into the scripts to install very early updates.

    THen when I check the config file as the first port of call. It contains

    <?php if ( ! defined('BASEPATH')) exit('Invalid file request');
    
    $config['protect_javascript'] = "n";
    $config['app_version'] = "0";
    ?>

    Seems to be very similar to the above. Sorry to hijack the thread.

    Thanks,
    Ian

     

  • #14 / Feb 27, 2012 6:25pm

    Sean C. Smith

    3818 posts

    Hi Ian,

    Before you run the upgrade what do you see in your config.php file? Please post it here and feel free to use ***** for the sensitive info.

    Sean

  • #15 / Feb 27, 2012 7:15pm

    ianryde

    112 posts

    Hi Sean,

    Thanks for your help. Here is the contents of the config file prior to upgrade:

    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    
    /*
    |--------------------------------------------------------------------------
    | ExpressionEngine Config Items
    |--------------------------------------------------------------------------
    |
    | The following items are for use with ExpressionEngine.  The rest of
    | the config items are for use with CodeIgniter.
    |
    */
    
    $config['app_version'] = "231";
    $config['install_lock'] = "";
    $config['license_number'] = "************";
    $config['debug'] = "0";
    $config['cp_url'] = "*********/system/index.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['site_label'] = "**********";
    $config['cookie_prefix'] = "";
    $config['allow_extensions'] = "y";
    $config['enable_db_caching'] = "n";
    $config['enable_throttling'] = "n";
    $config['max_page_loads'] = "30";
    $config['time_interval'] = "30";
    $config['lockout_time'] = "30";
    $config['enable_online_user_tracking'] = "n";
    $config['enable_hit_tracking'] = "n";
    $config['enable_entry_view_tracking'] = "n";
    $config['dynamic_tracking_disabling'] = "5";
    $conf['user_email_is_username'] = "y"; 
    $config['disable_all_tracking']  = "y"; 
    
    // END EE config items
    
    
    
    
    
    
    
    
    /*
    |--------------------------------------------------------------------------
    | Base Site URL
    |--------------------------------------------------------------------------
    |
    | URL to your CodeIgniter root. Typically this will be your base URL,
    | WITH a trailing slash:
    |
    | <a href="http://example.com/">http://example.com/</a>
    |
    */
    $config['base_url'] = "";
    
    /*
    |--------------------------------------------------------------------------
    | Index File
    |--------------------------------------------------------------------------
    |
    | Typically this will be your index.php file, unless you've renamed it to
    | something else. If you are using mod_rewrite to remove the page set this
    | variable so that it is blank.
    |
    */
    $config['index_page'] = "";
    
    /*
    |--------------------------------------------------------------------------
    | URI PROTOCOL
    |--------------------------------------------------------------------------
    |
    | This item determines which server global should be used to retrieve the
    | URI string.  The default setting of "AUTO" works for most servers.
    | If your links do not seem to work, try one of the other delicious flavors:
    |
    | 'AUTO'   Default - auto detects
    | 'PATH_INFO'  Uses the PATH_INFO
    | 'QUERY_STRING' Uses the QUERY_STRING
    | 'REQUEST_URI'  Uses the REQUEST_URI
    | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
    |
    */
    $config['uri_protocol'] = "AUTO";
    
    /*
    |--------------------------------------------------------------------------
    | URL suffix
    |--------------------------------------------------------------------------
    |
    | This option allows you to add a suffix to all URLs generated by CodeIgniter.
    | For more information please see the user guide:
    |
    | <a href="http://ellislab.com/codeigniter/user-guide/general/urls.html">http://ellislab.com/codeigniter/user-guide/general/urls.html</a>
    */
    
    $config['url_suffix'] = "";
    
    /*
    |--------------------------------------------------------------------------
    | Default Language
    |--------------------------------------------------------------------------
    |
    | This determines which set of language files should be used. Make sure
    | there is an available translation if you intend to use something other
    | than english.
    |
    */
    $config['language'] = "english";
    
    /*
    |--------------------------------------------------------------------------
    | Default Character Set
    |--------------------------------------------------------------------------
    |
    | This determines which character set is used by default in various methods
    | that require a character set to be provided.
    |
    */
    $config['charset'] = "UTF-8";
    
    /*
    |--------------------------------------------------------------------------
    | Enable/Disable System Hooks
    |--------------------------------------------------------------------------
    |
    | If you would like to use the "hooks" feature you must enable it by
    | setting this variable to TRUE (boolean).  See the user guide for details.
    |
    */
    $config['enable_hooks'] = FALSE;
    
    
    /*
    |--------------------------------------------------------------------------
    | Class Extension Prefix
    |--------------------------------------------------------------------------
    |
    | This item allows you to set the filename/classname prefix when extending
    | native libraries.  For more information please see the user guide:
    |
    | <a href="http://ellislab.com/codeigniter/user-guide/general/core_classes.html">http://ellislab.com/codeigniter/user-guide/general/core_classes.html</a>
    | <a href="http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html">http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html</a>
    |
    */
    $config['subclass_prefix'] = "EE_";
    
    
    /*
    |--------------------------------------------------------------------------
    | Allowed URL Characters
    |--------------------------------------------------------------------------
    |
    | This lets you specify which characters are permitted within your URLs.
    | When someone tries to submit a URL with disallowed characters they will
    | get a warning message.
    |
    | As a security measure you are STRONGLY encouraged to restrict URLs to
    | as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
    |
    | Leave blank to allow all characters -- but only if you are insane.
    |
    | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
    |
    */
    $config['permitted_uri_chars'] = "a-z 0-9~%.:_\-";
    
    
    /*
    |--------------------------------------------------------------------------
    | Enable Query Strings
    |--------------------------------------------------------------------------
    |
    | By default CodeIgniter uses search-engine friendly segment based URLs:
    | example.com/who/what/where/
    |
    | You can optionally enable standard query string based URLs:
    | example.com?who=me&what=something&where=here
    |
    | Options are: TRUE or FALSE (boolean)
    |
    | The two other items let you set the query string "words" that will
    | invoke your controllers and its functions:
    | example.com/index.php?c=controller&m=function
    |
    | Please note that some of the helpers won't…
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases