Recent Topics

1 Feb 17, 2011 11:08    

My b2evolution Version: 1.8.x

I've been trying to upgrade to 4.0.3 from 1.8.2, but I keep having troubles with MySQL errors. With my original 1.8.2 database (restored from my backup at the beginning), I get the following error:


Checking DB schema version... 9200 : OK.
Post-fix hit_referer_type == NULL... OK.
Marking administrator accounts as validated... OK.
Converting auto_prune_stats setting... OK.
Converting time_difference from hours to seconds... OK.
Updating hitlog capabilities... 

MySQL error!
Table 'b2evolve.T_useragents' doesn't exist(Errno=1146)
Your query:
ALTER TABLE T_useragents ADD INDEX agnt_type ( agnt_type )

I've tried editing out various portions of install/_functions_evoupgrade.php to get around the errors, but I keep getting new ones (and I'm not sure to what extent I'd be messing up my database if I ever got through everything).

I was able to upgrade to 1.10.3, but from there I couldn't upgrade to 4.0.3 or even to 2.4.7 (although 1.10.3 was further along in the checkpoint structure than I get when going directly from 1.8.2 to 4.0.3).

I haven't seen any other posts that are particularly applicable, so I'd appreciate any thoughts on what's going awry with my upgrade or how to get around my database problems.

Note: The primary reason for my upgrade is that my posts aren't showing up anymore. I believe this is because I upgraded php to 5.3.3 and it looks like the function call_user_func_array() used in inc/_misc/_misc.funcs.php within b2evolution 1.8.2 is now deprecated (best guess). I'd be willing to bail on the upgrade if there's a simple fix for that instead.

2 Feb 17, 2011 13:01

I might not be of much help, since I try always to stay up to date with b2evo versions. However, this is what I would do in your case:

1.- backup your original DB and files
2.- try everything from this point forward in a development server, localhost if possible so that everything uns faster.
3.- from 1.8.3 you could upgrade to 1.10.3. ¿Right? Well, I would try to upgrade to the next stable from there. That would be 2.4.5. I think you would have a better chance to fix problems going step by step.
4.- from 2.4.5 you would then try to upgrade to 3.3.1 and from there to 4.0.3

I think this would give you a better chance to get to the latest stable.

Have you made any customizations to your DB?

What where the problems you encountered when trying to upgrade from 1.10.3 to 2.4.7?

3 Feb 17, 2011 14:47

That's puzzling. 4.0.3 got rid of the useragent table (no idea if it was in 1.8 or 1.10) but I can't for the life of me figure out why the 4.0.3 update would be looking to ALTER a table that it no longer uses!

EDIT: On second thought I do see why it would.

I think you need to find what your database version is. The 4.0.3 update script creates the useragents table if your database version < 8840.

It alters that table (the part where your update is failing) if the old database version < 9940

Your database obviously doesn't have a useragents table, yet is >= 8840 and less than 9990. That's a big 'ol crack that your installation seems to be falling through.

Hopefully a dev can suggest a workaround.

4 Feb 17, 2011 17:49

Thanks for the quick replies!

Austriaco wrote:

3.- from 1.8.3 you could upgrade to 1.10.3. ¿Right? Well, I would try to upgrade to the next stable from there. That would be 2.4.5. I think you would have a better chance to fix problems going step by step.

I'll try this later tonight when I get a chance. I'm a little pessimistic, though, as I thought the install scripts/checkpoints didn't change much within those sub-versions.

Austriaco wrote:

Have you made any customizations to your DB?

I haven't intentionally done much of anything to the database, but I've migrated servers twice since the initial install (albeit just with mysqldump), so I can't say anything for sure.

Austriaco wrote:

What where the problems you encountered when trying to upgrade from 1.10.3 to 2.4.7?

I'll get a more detailed list when I try again tonight, but the general theme was an attempt to perform operations on non-existent tables. For the most part, I figured that I was safe just commenting out those sections & going to the next checkpoint. Eventually, though, I had a problem with skin_install() not being able to play with the skins table (evo_skins, IIRC), which seemed fairly significant.

BushLeagueCritic wrote:

I think you need to find what your database version is. The 4.0.3 update script creates the useragents table if your database version < 8840.

The original database was 9200 or just below. When upgrading through 1.10.3 and commenting out sections, I think I got up to 9400 or so (although the error in my first post is from when I started fresh after restoring all my backups).

I do have an evo_useragents table, though (evo_ being the standard prefix for my tables). When I've had other table errors, they always list, say, evo_skins as the problem. This is the only one where I get an error in a table like T_useragents. This seems like it should refer to the same thing, but my php is not strong enough to know the ins and outs of using T_blah for the tables.

5 Feb 18, 2011 03:39

Austriaco wrote:

3.- from 1.8.3 you could upgrade to 1.10.3. ¿Right? Well, I would try to upgrade to the next stable from there. That would be 2.4.5. I think you would have a better chance to fix problems going step by step.

I'll try this later tonight when I get a chance. I'm a little pessimistic, though, as I thought the install scripts/checkpoints didn't change much within those sub-versions.

It looks like I was wrong to be pessimistic. After resetting everything (and trying one more time to go from 1.8.2 to 4.0.3 directly, failing, and resetting again), I was able to go from 1.8.2 to 1.10.3, then from 1.10.3 to 2.4.5, then from 2.4.5 up to 4.0.3.

I compared the various _functions_evoupgrade.php files between the checkpoints where I had problems, but they seemed the same, so I have no idea why it worked for the small steps but not the big one. In any case, I have an upgrade that ostensibly works for now (we'll see after I start testing...). Thanks, all.

6 May 18, 2011 21:40

I have the same problem. If anyone knows a way to upgrade without going through the intermediate versions as the OP did, I would be delighted to know what it is!

I think the problem is with the install/_functions_evoupgrade.php script. The early sections of code to upgrade the database build an sql query using the $tableprefix variable and then execute the query. Later sections don't seem to use the $tableprefix variable. All the tables are prefixed with T_.

Don't know whether that's the problem or not, but it makes sense of the OP's error message about a table named T_useragents when his table was called evo_useragents.

7 May 20, 2011 19:34

If anyone knows a way to upgrade without going through the intermediate versions as the OP did, I would be delighted to know what it is!

I know you'd rather do the upgrade in one fell shot, but for what it's worth, I haven't had any problems since upgrading via the intermediate method.


Form is loading...