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.

Error 1062 - urgent help needed

December 12, 2011 1:03pm

Subscribe [2]
  • #1 / Dec 12, 2011 1:03pm

    Krake

    72 posts

    Hi, I updated from 1.6.8 to 2.3.1 and got this msg:

    Error Number: 1062
    
    Duplicate entry '3c71b0d0f83d6bfa692a0341f2c57fb9' for key 1
    
    UPDATE `pao_search` SET `search_id` = '3c71b0d0f83d6bfa692a0341f2c57fb9', `site_id` = '1', `search_date` = '1289495063', `keywords` = 'casa de niños definicion', `member_id` = '0', `ip_address` = '77.27.51.244', `total_results` = '0', `per_page` = '0', `query` = '', `custom_fields` = '', `result_page` = '' WHERE `site_id` = '1' AND `search_date` = '1289495063' AND `member_id` = '0' AND `total_results` = '0' AND `per_page` = '0' AND `site_id` = '1' AND `search_date` = '1289495063' AND `member_id` = '0' AND `total_results` = '0' AND `per_page` = '0'
    
    Filename: updates/ud_200.php
    
    Line Number: 465

    I’ve checked various threads and understand it might have to do with a corrupt database - which honestly sounds scary since I’m not a DB nerd…. in this case might it have to do with the ‘ñ’ in keywords??

    What to do?

    I need this up and running by tonight or Tuesday morning. I tried to go back to EE1, but I couldn’t (msg: couldn’t load prefs. etc)

    THANKS,
    Kath

  • #2 / Dec 13, 2011 12:09pm

    Kyle Cotter

    730 posts

    Hey Kath,

    Sorry to see you encountered this issue. I’m going to bring our developer Robin in on this so she can see what’s going on.

    In the meantime, see if these Troubleshooting Tips can help you to rollback to EE1.

    Thanks!

  • #3 / Dec 13, 2011 1:19pm

    Krake

    72 posts

    Thanks, Kyle. I really appreciate that.

    This moment I’m trying to rollback to EE1 acc. to wiki. Then I intend to update to 1.7.1 and have everything up and running before another EE2 upgrade attempt.

    Will let you know how things go, and I look forward to hearing from Robin.

    -Kath

  • #4 / Dec 13, 2011 1:22pm

    Robin Sowell

    13255 posts

    Do you have a copy of the config.php file from 1.6.8- from before you started the update?  And do you have a copy of the database from before starting the update?  Lastly- if you open up system/expressionengine/config/config.php what does it have for your $config[‘app_version’] and $config[‘ud_next_step’]?

  • #5 / Dec 13, 2011 1:40pm

    Krake

    72 posts

    Hi Robin,
    Thanks for getting back.

    I do have all the copies you mention from before the update.

    The EE2 config.php says:

    $config['app_version'] = "168";
    $config['ud_next_step'] = "convert_db_to_utf8";

    FYI: I tried to restore the backed up DB into a new one and then rollback to EE1. I modified copies of the old config.php and config_bak.php with the new DB name, user and pw, uploaded them and set config.php to 666. But apparently that’s not enough, because now I get this error: http://paolini.edu.mx/
    I haven’t deleted the old DB so we should still be on the safe path.

    -Kath

  • #6 / Dec 13, 2011 1:54pm

    Robin Sowell

    13255 posts

    Hrm- ok, what I would do:
    1. You have your new files up- replace the current system/expressionengine/config/config.php with your 1.x saved one.
    2. Go in and make sure system/expressionengine/config/database.php is a blank file
    3. Put up a copy of your 1.x database- make sure the config.php file has the right db name etc. for that database.

    Now- when you go to mysite.com/system/index.php does the ‘update’ screen come up?

    IF so- via phpmyadmin or something- run

    truncate pao_search

    Assumes pao is your prefix.

    Can you get that far?  If so- go ahead and re-run the update.

  • #7 / Dec 13, 2011 2:08pm

    Krake

    72 posts

    PROGRESS, everything’s smooth so far, yes!

    One doubt:

    IF so- via phpmyadmin or something- run

    truncate pao_search

    Assumes pao is your prefix.

    I assume this would be in the SQL tab of the new DB - or in localhost?

  • #8 / Dec 13, 2011 2:31pm

    Krake

    72 posts

    I ran the truncate successfully.

    But the installer won’t connect to DB, although 1.x config.php contains all the right data to new DB, and database.php is blank and both are 666:

    Unable to connect to your database server using the provided settings.
    Filename: controllers/wizard.php
    Line Number: 1518

    ...so what do we try now?

  • #9 / Dec 13, 2011 3:46pm

    Krake

    72 posts

    Finally managed to update by 1) creating yet another DB using old name and user + import old db and truncate pao_search 2) do the update in Safari and not FF

    But now I get this msg:

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

    It’s mentioned in this thread too, and these would be my answers to Kevin Smith’s questions:

    Is this an MSM install? NO
    Have you checked the path for $system_path in your admin.php file? OK
    Have you made sure your index.php and admin.php files are both EE 2 files and not artifacts from EE 1? BOTH EE2
    Is the front-end of your site working? NO, nor is CP
    If not, have you checked to ensure your database credentials are correct? OK
    If you’re comfortable looking into your database directly, is there a bunch of jumbled text in all the database fields in the ‘exp_sites’ table that end with ‘_preferences’? YES

    What should I do now… Another attempt with fresh EE files or do you have better ideas?

    -Kath, keeping up 😉

  • #10 / Dec 13, 2011 5:31pm

    Robin Sowell

    13255 posts

    One more quick set of questions- if you open the config.php file now- what’s showing for the version and the ud_next_step?

  • #11 / Dec 13, 2011 5:41pm

    Krake

    72 posts

    The new config.php file shows:

    App_version 231

    There’s no ud_next_step in it….

  • #12 / Dec 13, 2011 5:59pm

    Robin Sowell

    13255 posts

    OK- that’s mostly good news.  The update looks like it ran fine, but I suspect the exp_sites table was corrupted.  As long as you have a 1.x version of it, I can manually update it and that should get you going.

    That said- I’ll need to take a closer look.  I’ve sent an email with some details on how we can do that.

    Thanks for your patience on this one!

  • #13 / Dec 13, 2011 6:07pm

    Krake

    72 posts

    Great, and thanks a lot!! I’ll send you whatever info you need.
    -Kath

  • #14 / Dec 14, 2011 1:13pm

    Krake

    72 posts

    Hi all, up and running = case closed 😊

    This was the issue according to kind Robin Sowell:

    The site_preferences field in exp_sites was corrupted due to a character issue.  I believe I’ve got that squared away now.
    You’ll need to edit the site name in ‘Admin- General Config’- that’s what I had to tweak to prevent the data corruption.

    Thanks a lot for great support!
    -Kath

  • #15 / Dec 14, 2011 1:20pm

    Robin Sowell

    13255 posts

    Yay- glad the rest of the site checked out ok!  If you do run into any problems, just let us know.

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

ExpressionEngine News!

#eecms, #events, #releases