Recent Topics

1 Oct 31, 2015 03:13    

I am doing a manual upgrade of a site from v 5.2.2 (I think) to 6.6.5. I am getting the following error. I don't seem to be able to find any info on how to upgrade the database, only info to delete old files.

Additional information about this error:


/p>

Incorrect datetime value: '0000-00-00 00:00:00' for column 'user_created_datetime' at row 2(Errno=1292)


Your query:


ALTER TABLE evo_users MODIFY COLUMN user_pass VARBINARY(32)

3 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 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 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 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 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 Nov 02, 2015 02:34

@fplanque wrote earlier:

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 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.

11 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 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 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 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 Nov 03, 2015 01:17

@fplanque wrote earlier:

@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!!


Form is loading...