Recent Topics

1 Nov 18, 2007 18:41    

My b2evolution Version: 0.9.x

I have been very happy with 0.9.2 up to now but due to heavy spamming that I need to manually delete every weekend I have decided to upgrade to 1.10.03.

I did try to upgrade in the past but had some problems with the following issue: http://forums.b2evolution.net/viewtopic.php?t=10133 and finally reverted to 0.9.2. At that time I think I messed up with the restore of my database and this could be the origin of the upgrade problem I will describe below.

I uploaded all the files to a directory \blogs_new then renamed my existing directory to \blogs_old and renamed \blogs_new to \blogs.

Then I launched the installation script and updated the basic configuration settings as requested and chose the upgrade option (not a clean install).

I then get the following error message:

Upgrading data in existing b2evolution database

Checking DB schema version... 8066 : OK.
Dropping old Hitlog table... OK.
Creating table for active sessions...
An unexpected error has occured!

If this error persits, please report it to the administrator.

Go back to home page
Additional information about this error:

MySQL error!

Table 'evo_sessions' already exists(Errno=1050)

Your query:
CREATE TABLE evo_sessions (
sess_ID INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
sess_key CHAR(32) NULL,
sess_lastseen DATETIME NOT NULL,
sess_ipaddress VARCHAR(15) NOT NULL DEFAULT '',
sess_user_ID INT(10) DEFAULT NULL,
sess_agnt_ID INT UNSIGNED NULL,
sess_data TEXT DEFAULT NULL,
PRIMARY KEY( sess_ID )
)

I tried to manually drop the table evo_sessions but get a lot of other error messages with tables already existing. In the end, I used the following script to delete all the already existing tables as they showed up:

DROP TABLE IF EXISTS `evo_sessions`;
DROP TABLE IF EXISTS `evo_usersettings`;
DROP TABLE IF EXISTS `evo_plugins`;
DROP TABLE IF EXISTS `evo_poststatuses`;
DROP TABLE IF EXISTS `evo_posttypes`;
DROP TABLE IF EXISTS `evo_files`;
DROP TABLE IF EXISTS `evo_basedomains`;
DROP TABLE IF EXISTS `evo_useragents`;
DROP TABLE IF EXISTS `evo_subscriptions`;
DROP TABLE IF EXISTS `evo_bloggroups`;
DROP TABLE IF EXISTS `evo_links`;

But still cannot succeed. The last error message I now get is:
Upgrading data in existing b2evolution database

Checking DB schema version... 8066 : OK.
Dropping old Hitlog table... OK.
Creating table for active sessions... OK.
Creating user settings table... OK.
Creating plugins table... OK.
Creating table for Post Statuses... OK.
Creating table for Post Types... OK.
Creating table for File Meta Data... OK.
Creating table for base domains... OK.
Creating table for user agents... OK.
Creating table for Hit-Logs... OK.
Creating table for subscriptions... OK.
Creating table for blog-group permissions... OK.
Upgrading blogs table...
An unexpected error has occured!

If this error persits, please report it to the administrator.

Go back to home page
Additional information about this error:

MySQL error!

Can't DROP 'blog_stub'; check that column/key exists(Errno=1091)

Your query:
ALTER TABLE evo_blogs
MODIFY COLUMN blog_ID int(11) unsigned NOT NULL auto_increment,
MODIFY COLUMN blog_links_blog_ID INT(11) NULL DEFAULT NULL,
CHANGE COLUMN blog_stub blog_urlname VARCHAR(255) NOT NULL DEFAULT 'urlname',
ADD COLUMN blog_allowcomments VARCHAR(20) NOT NULL default 'post_by_post' AFTER blog_keywords,
ADD COLUMN blog_allowblogcss TINYINT(1) NOT NULL default 1 AFTER blog_allowpingbacks,
ADD COLUMN blog_allowusercss TINYINT(1) NOT NULL default 1 AFTER blog_allowblogcss,
ADD COLUMN blog_stub VARCHAR(255) NOT NULL DEFAULT 'stub' AFTER blog_staticfilename,
ADD COLUMN blog_commentsexpire INT(4) NOT NULL DEFAULT 0 AFTER blog_links_blog_ID,
ADD COLUMN blog_media_location ENUM( 'default', 'subdir', 'custom', 'none' ) DEFAULT 'default' NOT NULL AFTER blog_commentsexpire,
ADD COLUMN blog_media_subdir VARCHAR( 255 ) NOT NULL AFTER blog_media_location,
ADD COLUMN blog_media_fullpath VARCHAR( 255 ) NOT NULL AFTER blog_media_subdir,
ADD COLUMN blog_media_url VARCHAR(255) NOT NULL AFTER blog_media_fullpath,
DROP INDEX blog_stub,
ADD UNIQUE blog_urlname ( blog_urlname )

I'm now stuck...

I have the impression that my database is corrupted due to failed earlier upgrade and a restore that was not clean but I do not have any cleaner backup copy.

How can I upgrade to 1.10.03 clean? I am willing to do some manual work to get this done if somebody will tell me how to. Maybe a clean install would be a solution but I would like to keep all my existing posts so maybe there is an export / import function for this.

Thanks

2 Nov 18, 2007 22:39

You really sound like you have one screwed up database :P

Probably the best thing you could do is restore your 0.9.ancient database and compare it's schema to a fresh 0.9.x installs database, delete any fields/tables that aren't part of a normal 0.9.x and then try an upgrade.

Of course you'd do this all locally or on a backup domain or summat ... otherwise you could end up with two screwed up installs and only a blonde to blame ;)

¥

3 Nov 19, 2007 10:00

Thanks for the hint. I'm afraid this is beyond my capabilities.

I do not know how to compare the schema of two databases and I do not know what the normal 0.9.x schema looks like

Any further detailed instructions or another suggestion?

:(

4 Nov 24, 2007 16:18

Anybody available to help out?

In the meantime I restored my old version 0.9.2 and it's working under www.dophan.com/blogs (but still need to get rid of my spam manually every weekend so I'd really like to upgrade to 1.10.3

Thanks

5 Nov 25, 2007 13:24

Hi,
The best way to cure your problems is to do what I said earlier.

1) create a new database and then change your config details ( /conf/_config.php ) to point to the new database and then run the 0.9.2 installer.

2) change your database details back so your blog continues to run

3) create yet another new database and copy your current 0.9.2 tables across to it

4) compare the fresh 0.9.2 tables to the copy of your current 0.9.2 tables

5) drop any tables from your copy of your current 0.9.2 database that aren't in the fresh 0.9.2 database

6) upload 10.3 and try an upgrade using the copy of your current 0.9.2

If all goes well there is no step 7 ;)

¥

6 Dec 29, 2007 20:11

A big thanks to Y. :D

He helped me by correcting my database and I have now upgraded to 1.10.3.

This topic can be closed as solved.

7 Dec 29, 2007 20:37

Congratulations apassio!

I'm always happy to hear that someone using "dark ages" versions successfully upgrades to 1.10.3 (or beyond). It is especially nice that you shared your success here, so thanks much for that.

Hopefully the next 0.* user who comes along will find this thread and see that it'll all work out. There is simply no reason to not upgrade yah? The big key to me is that users have a fresh backup of their database and files so that if something wanks up it'll be possible to go back to the beginning and try again.


Form is loading...