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.

Lost Admin/Config file after upgrade - replaced but not working

September 28, 2011 5:26am

Subscribe [4]
  • #1 / Sep 28, 2011 5:26am

    Hi guys,

    Managed to lose my config.php and database.php files after doing the security update to 2.2.2 - I was using 2.2.1 (I think - either way it was a very recent version).

    I look after a few sites so I used another site’s 2.2.2 config.php and database.php files as a template, changed the details throughout the file to match my site details and everything seems to be working fine with the front-end of the site. Only problem now is that I can’t login to the site. Once I’ve clicked the login button, nothing happens.

    I’ve looked through the forums but couldn’t find an exact answer… Any ideas?

  • #2 / Sep 28, 2011 5:41pm

    Dan Decker

    7338 posts

    Hello StrangeChameleon,

    I’m sorry you’ve bumped into this, it might be easier if we can go in and have a look. I’ll be sending you an email shortly. Please follow the link provided and *do not* reply directly to that email.

    Cheers,

  • #3 / Sep 28, 2011 5:55pm

    Hi Dan,

    Really don’t like giving out login details - bit nervous as this is my main business site that’s taken a loooong time to setup and build. Is there anything I can try before we start thinking about giving out login details?

  • #4 / Sep 28, 2011 6:04pm

    Dan Decker

    7338 posts

    StrangeChameleon,

    I can completely understand. I will note that our login request form is completely secure. Your details are stored in a secure, separate, staff-only environment, and they are not kept on file once your issue is resolved. My intent was to save you the time of the “try this, try that” back and forth that this could break down to. But, I completely respect your position and I’ll do everything I can to resolve this for you here.

    My first option would be to verify your database credentials in database.php as well as verifying the cache path located there.

    Would you be willing to paste a sanitized version of your config.php here for us to look over?

    Cheers,

  • #5 / Sep 28, 2011 6:20pm

    Hmm ok - I’ll give it a try - could you re-send the secure form link?

  • #6 / Sep 29, 2011 9:46am

    Sue Crocker

    26054 posts

    Re-sent. Please check your email.

  • #7 / Oct 02, 2011 1:56pm

    Tried entering the details but the form keeps throwing up a “supply valid forum URL” warning…

  • #8 / Oct 02, 2011 3:50pm

    Another development too - tried resetting the admin password and it came up with:

    A Database Error Occurred
    
    Error Number: 1054
    
    Unknown column 'salt' in 'field list'
    
    UPDATE `exp_members` SET `salt` = 'O(I!@`zSJR\\8!L!T`UPQg-*?E)TQ?F=LvBhxV{
    
    Filename: libraries/Auth.php
    
    Line Number: 271

     

  • #9 / Oct 02, 2011 5:22pm

    Sue Crocker

    26054 posts

    Hi, StrangeChameleon.

    What URL were you trying to add?

    This should work: http://ellislab.com/forums/viewthread/200876

    Give it a try again, and we’ll start troubleshooting.

  • #10 / Oct 02, 2011 5:39pm

    That worked - left the hashtag on the end and that seemed to upset it!

    Ok I’ve sent the login details across - I’ve tried resetting the password on the superadmin account so not sure if that one will work (I’ve got the feeling the password request didn’t go through anyway).

    Thanks for the quick responses!

  • #11 / Oct 04, 2011 5:44pm

    Kevin Smith

    4784 posts

    Hi StrangeChameleon,

    Before we do anything else, I’d like to take a look at this again:

    Another development too - tried resetting the admin password and it came up with:

    A Database Error Occurred
    
    Error Number: 1054
    
    Unknown column 'salt' in 'field list'
    
    UPDATE `exp_members` SET `salt` = 'O(I!@`zSJR\\8!L!T`UPQg-*?E)TQ?F=LvBhxV{
    
    Filename: libraries/Auth.php
    
    Line Number: 271

    Even if the config.php and database.php files weren't lost, this would still worry me. That field should be in the database, so this error means that part of the upgrade didn't complete successfully. Rather than try to patch a band-aid over this, the best course of action here is to perform the upgrade again using your backup as the starting point.

    Restore your site's files from the backup you took immediately before the upgrade, and do the same for your database. (Be sure to drop all the tables in your database before restoring the backup.)

    Make sure to follow the upgrade instructions exactly. If you experience any errors along the way, please post them back here for us to review.

  • #12 / Oct 06, 2011 5:41am

    Hi Kevin,

    I followed the instructions exactly - only thing I didn’t do was create a backup before the upgrade… :os

    Is there anyway I can get out of this or would you recommend overwriting the site files with a previous copy of EE that uses the current database model, then uploading the 2.2.2 files again before performing the upgrade?

  • #13 / Oct 08, 2011 12:24am

    Kevin Smith

    4784 posts

    Please, please, please promise me that you’ll never again do an upgrade or any major work on your site without a backup of your site files and database! It’s so very important and this is why we remind you about it in the User Guide and again in the Upgrade Wizard.

    You’re missing some crucial fields in your database, which means something went really wrong with the upgrade. We really can’t fix this with patchwork here. We need you to be able to roll back to a backup of your system at its former working state and retry the upgrade, noting the steps in my previous post. Could you check with your host to see if they might have a recent backup of your site’s files and database?

  • #14 / Oct 12, 2011 4:53pm

    Looks like my hosting co doesn’t keep previous copies of the DB - I’m guessing this means that we’re onto damage limitation rather than a solution.

    With a bit of black magic (and some finer work with phpmyadmin) is it possible to rescue any section of the data? There’s a specific channel that contains a LOT of data that would be a massive pain if we lost.

    I know we’re leaving the realms of what you’re able to assist with (especially since it is entirely my fault) but is there a process of saving a specific table of data in this instance?

  • #15 / Oct 12, 2011 5:13pm

    Kevin Smith

    4784 posts

    Unfortunately, this is indeed beyond the scope of support we can offer at this time. I’m afraid it’s probably best to call upon the EE community to see if anyone’s up to the task. I’d suggest posting a job in the job board, seeing if anyone on Twitter could recommend a consultant, or even posting to the wider web community through a site like Authentic Jobs. You’ll need an EE/MySQL expert to help you comb through and get your database back into working order.

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

ExpressionEngine News!

#eecms, #events, #releases