2 sam2kb Oct 04, 2011 06:08


Is this the bit you mean?
Checking files...
Preparing to install .htaccess ... Already installed.
Upgrading data in existing b2evolution database...
Loading module: _core/model/__core.install.php
Loading module: collections/model/_collections.install.php
Loading module: files/model/_files.install.php
Loading module: sessions/model/_sessions.install.php
Loading module: messaging/model/_messaging.install.php
Loading module: maintenance/model/_maintenance.install.php
Checking DB schema version... 9960 : OK.
 Creating table for default currencies...
is there any more information i can provide that would help resolve this?

Sorry I missed your reply.
I fixed several bugs in the upgrade script since v4.0.5
Please try to upgrade to 4.1.1 stable instead, and post complete report in case of fail.
Don't forget to restore DB backup first.
Restored to pre 4.x update, uploaded 4.11 files, tried install again... same error :(
Checking files...
Preparing to install .htaccess ... Already installed.
Upgrading data in existing b2evolution database...
Loading module: _core/model/__core.install.php
Loading module: collections/model/_collections.install.php
Loading module: files/model/_files.install.php
Loading module: sessions/model/_sessions.install.php
Loading module: messaging/model/_messaging.install.php
Loading module: maintenance/model/_maintenance.install.php
Checking DB schema version... 9960 : OK.
 Creating table for default currencies... 
An unexpected error has occurred!
If this error persists, please report it to the administrator.
Go back to home page
Additional information about this error:
MySQL error!
Table 'evo_currency' already exists(Errno=1050)
Your query: 
CREATE TABLE evo_currency (
        curr_ID int(10) unsigned NOT NULL auto_increment,
        curr_code char(3) NOT NULL,
        curr_shortcut varchar(30) NOT NULL,
        curr_name varchar(40) NOT NULL,
        PRIMARY KEY curr_ID (curr_ID),
        UNIQUE curr_code (curr_code)
      ) ENGINE = innodb

You database version 9960 is correct for b2evo 3.3, however for some reason you already have tables evo_currency and most likely evo_country in your database. Seems like you backed up a half-upgraded database.
Open phpmyadmin and see if you already have evo_users__usersettings table. If the table is there we can skip one DB checkpoint.
Insert lots of expletives as I realise I overwrote my DB backup with a later (broken) copy. Idiot! Sigh.
Right I have:
evo_antispam 
evo_basedomains 
evo_bloggroups 
evo_blogs 
evo_blogusers 
evo_categories 
evo_coll_settings 
evo_comments 
evo_country 
evo_cron__log 
evo_cron__task 
evo_currency 
evo_files 
evo_filetypes 
evo_global__cache 
evo_groups 
evo_groups__groupsettings 
evo_hitlog 
evo_items__item 
evo_items__itemtag 
evo_items__prerendering 
evo_items__status 
evo_items__tag 
evo_items__type 
evo_items__version 
evo_links 
evo_locales 
evo_messaging__contact 
evo_messaging__message 
evo_messaging__thread 
evo_messaging__threadstatus 
evo_pluginevents 
evo_plugins 
evo_pluginsettings 
evo_pluginusersettings 
evo_plugin_captcha_img_37_data 
evo_plugin_captcha_img_37_trackbacks_wl 
evo_plugin_openid_33_assoc 
evo_plugin_openid_33_nonces 
evo_plugin_openid_33_user_openid 
evo_postcats 
evo_sessions 
evo_settings 
evo_skins__container 
evo_skins__skin 
evo_slug 
evo_subscriptions 
evo_track__goal 
evo_track__goalhit 
evo_track__keyphrase 
evo_useragents 
evo_users 
evo_usersettings 
evo_users__fielddefs 
evo_users__fields 
evo_users__usersettings 
evo_widget 
 57 tables 
Does that help?

Could you also post DB scheme too. There's an option in phpmyadmin to export DB scheme (no data needed).
I can't find an option to export just the schema. I can only seem to export the whole database, data and all.
I also presume you mean the information_schema database?

I only need b2evo table structure. When you view the database in phpmyadmin go to Export and deselect "Data"
I'm using PHPMyAdmin 3.4.5 which looks nothing like that, and doesn't have that option, but I eventually worked it out.
Zipped here:

This is what you need to do to repair your broken database.
- Delete "ctry_enabled" column from "evo_country" table
- Set correct DB version which is 9970 in "evo_settings" table > "db_version"
- Backup the database (again)
- And run the upgrade script from b2evo 4.1.1
Had to also delete the currency_enabled column from evo_curreny, but that all worked a charm. Many many thanks for saving my blog!
Cheers!
F

No problem.
Seems like upgrade failed the first time, then you ran installer again and got the above error message.
Anyway, you may need to edit upgrade script a bit to skip changes that has been already done. Could you post all messages from installer, including checkpoint versions ?