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.

Upgrade to 2.2.1 failed: Database Error

July 31, 2011 5:17pm

Subscribe [2]
  • #1 / Jul 31, 2011 5:17pm

    jose riveros

    14 posts

    Attempted to upgrade my local development installation before updating my live site. Using Xampp. Site functioned properly.

    Prior version: 2.1.4 beta

    Updated version: 2.2.1

    Database error:

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: strlen() expects parameter 1 to be string, object given
    
    Filename: libraries/Auth.php
    
    Line Number: 240
    A Database Error Occurred
    
    Error Number: 1054
    
    Unknown column 'salt' in 'field list'
    
    UPDATE `exp_members` SET `salt` = 'ADJ5o*DWuJrkH6SJ74_lNz:VAP\"Du8e+A/EDc.@@4#\'b\'vf)DxY^\"TEE@g6foxyWp)Hpz.)i-Z>{IM)_sOy<3LRs3pvS+b!1T-t!Rpxn_|Hf>)#k*=O', `password` = '0567bc00b22c956282f8a07c93f279d9c05d664b16a575b868ff63ef831fb0fcdc796b5d817200a8a1f8dbb23db6a5e45d735565b103b992446f5853d1474c1c' WHERE `member_id` = 1
    
    Filename: C:\xampp\htdocs\[SYSTEM NAME]\codeigniter\system\database\DB_driver.php
    
    Line Number: 330

    I followed the upgrade installation instructions. This is now the second failed attempt.

    The site loads properly. The control panel fails to load. Only the above errors.

    Ran the update wizard successfully: “You are now running the most current version of ExpressionEngine!”

    Suggestions?

  • #2 / Aug 01, 2011 12:06pm

    jose riveros

    14 posts

    Bump.

    I want this resolved as soon as possible.

  • #3 / Aug 01, 2011 1:34pm

    Sue Crocker

    26054 posts

    Hi, Jose.

    If you look at your config.php file, what’s the version number showing there?

  • #4 / Aug 01, 2011 1:48pm

    jose riveros

    14 posts

    As per instructions, I updated my config file. The specific line reads:

    $config['app_version'] = "221";
  • #5 / Aug 02, 2011 8:56am

    Sue Crocker

    26054 posts

    Did you manually update the config.php file, or did EE do it for you? The upgrade should do the changing of the app_version for you.

    What steps did you take to upgrade?

  • #6 / Aug 02, 2011 10:23am

    jose riveros

    14 posts

    As per the instructions:

    3.  Restore Modified Files

    Files and settings that are specific to your site should now be restored from the backup you made in Step 1.

      Restore any modifications made to the following files, such as updating the system folder name or path:
          admin.php
          index.php

    ...

      Restore the following files from your backup:
          system/expressionengine/config/config.php
          system/expressionengine/config/database.php

    Running the update wizard zeros out the content of the config.php file and inserts a “0” for the version number. I then have to manually type in the version number before the update wizard can continue. Once the initial errors are dealt with I then restore the remainder of the contents of the config.php file.

    This then generates the php and database errors while trying to login to the control panel.

    I have now attempted to update to 2.2.1 or 2.2.2 on two different local development installations (Windows and Mac). Both with the same results.

  • #7 / Aug 02, 2011 10:42pm

    jose riveros

    14 posts

    After restoring the config.php file, these are the errors I get once I run the installer:

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined variable: DB
    
    Filename: updates/ud_009.php
    
    Line Number: 40
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Trying to get property of non-object
    
    Filename: updates/ud_009.php
    
    Line Number: 40
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/[SYSTEM NAME]/codeigniter/system/core/Exceptions.php:170)
    
    Filename: core/Common.php
    
    Line Number: 409
    A Database Error Occurred
    
    Error Number: 1060
    
    Duplicate column name 'can_search'
    
    ALTER TABLE exp_member_groups ADD COLUMN can_search char(1) NOT NULL default 'n'
    
    Filename: updates/ud_009.php
    
    Line Number: 112

    And the reason I get these error messages is because the installer completely wipes out my config file and replaces the content with this:

    <?php if ( ! defined('BASEPATH')) exit('Invalid file request');
    
    $config['site_url'] = "http://localhost/[NAME OF SITE].dev/";
    $config['app_version'] = "0";
    ?>

    I then change the app version to “222”.

    The installer then prompts me with:

    ExpressionEngine Installation and Update Wizard

    You are now running the most current version of ExpressionEngine!

    I then restore the remainder of the contents of the config.php file and proceed to remove the installer folder as instructed.

    Which produces similar error messages as I included in the first post:

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: strlen() expects parameter 1 to be string, object given
    
    Filename: libraries/Auth.php
    
    Line Number: 240
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/[SYSTEM NAME]/codeigniter/system/core/Exceptions.php:170)
    
    Filename: core/Common.php
    
    Line Number: 409
    A Database Error Occurred
    
    Error Number: 1054
    
    Unknown column 'salt' in 'field list'
    
    UPDATE `exp_members` SET `salt` = 'X:!l=cZQJ&\'#;![i]8[i5LO4kGHmyxUIXNn(hS3S~p]a|;{]{pGCe+(;-6E@>C57KQiV8gYB;ZeWJg#SIBDjk\'3UIxXHAqxI(+g,wFb4[86m-sC{8KhvU7c_e%wHw_El', `password` = '0cb33ecd1f945296701a4a3a54ab650dafb4b117e209d5c6d5515a5e50d867053dbd8db9b82a997d18070727ec2457f3ad0c8bafeaf45ccde384da4eff7aa855' WHERE `member_id` = 1
    
    Filename: libraries/Auth.php
    
    Line Number: 271

    I would greatly appreciate some help here.

  • #8 / Aug 03, 2011 1:22am

    jose riveros

    14 posts

    Quite honestly, I don’t know what I did, but after several more attempts I was able to get the update installed properly.

  • #9 / Aug 04, 2011 1:40pm

    Sue Crocker

    26054 posts

    Hi, Jose. Glad you were able to get this fixed. It may have been that the config.php file wasn’t writable or something similar. If anything else comes up, please do let us know in a new thread..

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

ExpressionEngine News!

#eecms, #events, #releases