TinyPortal

Development => Support => Installation => Topic started by: webby on August 25, 2012, 03:53:31 PM

Title: Install keeps failing on tp_upgrade.php
Post by: webby on August 25, 2012, 03:53:31 PM
I've tried every trick I know but install keeps failing with the following message:

Quote
Invalid default value for 'bar'
File: /Packages/temp/SMF2/tp_upgrade.php
Line: 324

Help!
Title: Re: Install keeps failing on tp_upgrade.php
Post by: webby on August 25, 2012, 06:46:04 PM
I solved the problem by deleting all the tp tables in MySQL.
Title: Re: Install keeps failing on tp_upgrade.php
Post by: IchBin™ on August 27, 2012, 09:49:16 AM
Glad you got it sorted. I think it may have something to do with your version of MySQL or something like having it in strict mode. I'll have to do some testing and see if I can replicate the issue though.
Title: Re: Install keeps failing on tp_upgrade.php
Post by: ladrius on October 08, 2012, 01:20:28 PM
Same error.

Solved it the same way...thanks!
Title: Re: Install keeps failing on tp_upgrade.php
Post by: IchBin™ on October 08, 2012, 01:56:31 PM
Same error.

Solved it the same way...thanks!

Two awesomes in one post.
1. Awesome you fixed it
2. Awesome you found it by searching! :D
Title: Re: Install keeps failing on tp_upgrade.php
Post by: IchBin™ on January 31, 2013, 10:15:24 AM
Apparently it thinks that TP was trying to set a default value for the illustrator field in the articles table. Even though TP does not try to set any default value that I can see. Not sure what happened there for you. Maybe the table had a default value set before you dropped it somehow. That's about the only thing I can think of.
Title: Re: Install keeps failing on tp_upgrade.php
Post by: Charles Parker on February 23, 2014, 07:21:20 PM
I just upgraded from 1.17 smf with an old version of TP (can't remember which) however I had teh same issue.
Quote
BLOB/TEXT column 'illustration' can't have a default value
Line 324

Looking at the database columns (in the table 'smf_tp_articles') I found that there was a default value set to "0" and it was an int(11) data type

I changed it to a BLOB and removed the default value and set it to NULL

This allowed the installation to continue with no obvious problems.
However...
I would like to know what the correct data type is supposed to be, etc.
It worked - but if its supposed to be an Int(11)
I would like to change it back ASAP
Many thanks!
Title: Re: Install keeps failing on tp_upgrade.php
Post by: IchBin™ on February 23, 2014, 11:50:01 PM
It's supposed to be a text field. Not an int. You just need to remove the default attribute so that it's not trying to set a default value anymore.
Title: Re: Install keeps failing on tp_upgrade.php
Post by: Charles Parker on February 24, 2014, 06:52:13 PM
Thanks I will change it to a text field, at one point you must have had it as an int(11) because I have never touched it prior. Its just the way I found it.
what is the default length of the text field? btw.

Thank you so much for your efforts, I am one of many who feel smf is not smf without tp
you guys (bloc, etc) are awesome
Title: Re: Install keeps failing on tp_upgrade.php
Post by: IchBin™ on February 24, 2014, 08:08:39 PM
A text field is 65,535 bytes. I've noticed this with a few people. If I get a free moment, I'll have to see how that field is used, and if I need to fix the installer to update that field.
Title: Re: Install keeps failing on tp_upgrade.php
Post by: Charles Parker on February 24, 2014, 08:49:32 PM
Yeah, I would check the data types over time to see if it was changed at one point as well as at what point (version) it was assigned a default value of zero. Like I said I never changed or altered it and it could only have changed in one of the beta versions or something. Looks like I had (from 2008) TPv1.05beta1.zip installed and I found tp1beta4 and TP106_beta2 in my backups from 2010
so theres a few clues
but it seems it might be easier to just delete the default of 0 on install (edit the db) of TP if it exists...

Good luck, also you could just let folks figure it out since it really isn't that hard - lol