1 fredsy Oct 31, 2015 03:13
3 fplanque Oct 31, 2015 15:10
We will try to fix this in 6.6.6
In the meantime you can remove the problem by changing the SQL mode of your MySQL if you know how to do that?
The SQL mode should be "NO_ZERO_DATE" or "ALLOW_INVALID_DATES".
4 fplanque Oct 31, 2015 15:13
Can you please tell us your exact MySQL version and tell us if it was pre-installed by your web host (who?) or by some package like WAMP?
We will try to fix this in 6.6.6.
In the meantime you can remove the problem by changing the SQL mode of your MySQL if you know how to do that?
The SQL mode should probably be something like "NO_ZERO_DATE" or "ALLOW_INVALID_DATES".
5 fredsy Nov 01, 2015 23:18
Thanks fplanque, but it looks as though it was my screw up. I accidentally uploaded the new b2evo files in the wrong folder on my host, and in restoring, I managed also to not completely let the restore process continue closing the browser before it was done. So not realising I screwed that up, I tried to upgrade and that caused errors with the database. Not realising that I'd caused errors in the database I also accidentally over-rode my db backup. ... Sigh... so I just compounded one error with another. Now I'm going to an older backup and seeing if I can upgrade from there. Fortunately the site does work from the most (and second) recent restore point, I just can't upgrade it at the moment.
My mysql is 5.6.27. It came pre-installed with my web host.
I don't know how to change the SQL mode.
Oh, and I've been following the info from:
http://b2evolution.net/man/unexpected-error-during-upgrade
I get to step four and the upgrade process fails with errors telling me there are tables already existing in the database.
6 fplanque Nov 02, 2015 02:28
When you have a touchy situation like this it often helps to work on the upgrade on a local copy of your site/DB instead of your production server. It removes a lot of stress and you can do things more calmly ;)
7 fredsy Nov 02, 2015 02:32
For fun, I installed a completely clean 5.2.2 version into a different folder on my host, then ran the auto-upgrade. It worked perfectly. So at least I know it's not a server issue, but a problem with my live site.
8 fredsy Nov 02, 2015 02:34
When you have a touchy situation like this it often helps to work on the upgrade on a local copy of your site/DB instead of your production server. It removes a lot of stress and you can do things more calmly ;)
Yes, problem is that I keep forgetting to do that. ;)
Besides which I've tried now to upgrade from my second-to-last backup from several months ago and it still fails with errors. As per my above comment, it's not an issue with my server (it helps also that I've tested using 2 entirely different web hosts) so there must be something wrong with the live version anyway.
9 fredsy Nov 02, 2015 02:46
So, working with the current 5.2.2 version and database, I try to force an install to 5.2.2. I get the error message pictured in my attachment.
10 fredsy Nov 02, 2015 02:48
I press the upgrade button, and get the following.
11 fredsy Nov 02, 2015 02:49
I run the install for 5.2.2 again and everything looks fine.
Now I run the auto-upgrade for 6.6.5. It fails with the following
12 fredsy Nov 02, 2015 02:52
I'm totally stuck. I have no idea how to fix things other than maybe starting from fresh and importing every blog post and comment by manual copy and paste.
13 fplanque Nov 02, 2015 16:11
@fredsy Thank you for the screenshot. We will add code to the 6.6.6 upgrade so it fixes the DB for you.
14 fplanque Nov 02, 2015 17:00
@fredsy one thing you can try in between is go to the file /inc/_core/model/db/_db.class.php
and comment out the line 437/438 from
// Force MySQL strict mode
$this->query( 'SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)' );
to
// Force MySQL strict mode
// $this->query( 'SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)' );
I got confirmation from someone else that this solves the problem (as a temporary fix)
15 fredsy Nov 03, 2015 01:17
@fredsy one thing you can try in between is go to the file
/inc/_core/model/db/_db.class.php
and comment out the line 437/438 from
// Force MySQL strict mode
$this->query( 'SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)' );
to
// Force MySQL strict mode
// $this->query( 'SET sql_mode = "TRADITIONAL"', 'Force MySQL "strict" mode (and make sure server is not configured with a weird incompatible mode)' );
I got confirmation from someone else that this solves the problem (as a temporary fix)
Thanks so much! Using the second-to-last backup, I managed to upgrade using this hack. I will have to manually add in things that are missing from the blog, but it's not much and at least now I can move on.
Thanks again, you saved my day!!
Upon some searching and prodding, I think I'm having the same problem as described in this thread:
http://forums.b2evolution.net/5-2-2-stable-g-6-6-3
Will update further with results from following the info provided there.