MyBB Community Forums

Full Version: upgrade failed from 1.4.14
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi to all,


i have try to upgrade from 1.4.14 to 1.6, but without success...


some infos:
1) all plugins was disabled / uninstalled (where applicable)
2) i don't use custom template
3) the base_board was constantly update from 1.4.9 to 1.4.14
4) db is mysql

when i launch the upgrade script i got

Quote:[11-Oct-2010 12:48:29] PHP Fatal error: <strong>[SQL] [1060] Duplicate column name 'prefix'</strong><br />ALTER TABLE edk_threads ADD prefix smallint unsigned NOT NULL default '0' AFTER subject in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550


if i try to run it again, i got
Quote:[11-Oct-2010 12:53:47] PHP Fatal error: <strong>[SQL] [1091] Can't DROP 'allowvideocode'; check that column/key exists</strong><br />ALTER TABLE edk_calendars DROP allowvideocode in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550


and, if i do a new try
Quote:[11-Oct-2010 12:54:27] PHP Fatal error: <strong>[SQL] [1091] Can't DROP 'referralstype'; check that column/key exists</strong><br />ALTER TABLE edk_promotions DROP referralstype in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550


after a couple of retries, i got this error, permanent (i means, if i try to re-run the script, i will just got this one)
Quote:[11-Oct-2010 12:58:27] PHP Fatal error: <strong>[SQL] [1060] Duplicate column name 'prefix'</strong><br />ALTER TABLE edk_threads ADD prefix smallint unsigned NOT NULL default '0' AFTER subject in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550


when php_error.log got a line, the upgrade script on webpage hangs.


Since i was enough prudent, no damage was made to official board, but this one is unusable. (was a backup/restore of the original board)


Any help?
up

And, btw, i know how much annoying is "up" a thread, but consider that
1) i have read two times all the docs regarding upgrade the forum engine
2) i have read all the post that might be related to my issue
3) my forum is quite big (75K people) and i really don't want to switch to another forum engine, conversion can be a pain in the lime honestly

For that reason, i think that an "up" will not be judge too annoying, cos that's the only place where i can get some assistance, at least i hope!

Tnx
Did you backup your database first?? At what stage in the upgrade did you get these errors?? I don't see how any of them are possible, before it tries to add any columns it drops it first; there shouldn't be a duplicate of prefix as it'd drop it before trying to add it, and would only try and drop allowvideocode/referralstype if it already exists. It does these checks to avoid stuff like this happening.
yep, i have backup everything, and i am doing all the test on a mirror installation of my board.

I got this error after
"adding index to private messages"

basically the 1st reload of upgrade.php.

I have try to do it now starting with a new backup/restore (since i don't know what to do tonight hehehe) and, again, one of this error

[12-Oct-2010 14:07:06] PHP Fatal error: <strong>[SQL] [1091] Can't DROP 'referralstype'; check that column/key exists</strong><br />ALTER TABLE edk_promotions DROP referralstype in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550


Just for your reference, what i do is

*cp Upload UploadBKP -r
*mysqldump -u rama -p forum > back.sql
*mysql --> create db forum2
*mysql -u rama -p forum2 < back.sql

*edit config.php / setting.php to reflect forum2 DB plus the different vhost
*upload 1600 version using scp from my macbox to linux srv.
*reload lighttpd config to add the vhost
*goto newhost.loft12345/install/upgrade.php
select, press ok, wait for pm indexing, get the error Sad

since i was quite despreate i have even try to do something of stupid like upgrade php to 5.3.3 and mysql 5.0.51a (debian installer, i wasn't brave enough to compile it by myself, and i don't think that is really useful)

tnx for your assistance
still no news?
As I said, I can't see how you're getting these errors at all as there is code to prevent these errors from happening. For example, the error in your last post, this is what it's running:

if($db->field_exists('referralstype', 'promotions'))
{
	$db->drop_column("promotions", "referralstype");
}

It checks if it exists, and then drops it. It wouldn't return true in the check for if it exists and then say it doesn't when trying to drop it. It only tries to drop it if it actually exists, if it doesn't, it doesn't try and drop it.

All I can really suggest is to import the backup again, download the 1.6 files fresh, and try again. As far as I'm aware you're the only person to keep getting these errors.
Hello,


i wonder to give an update regarding this issue.

After trying almost infinite time to upgrade to 1.6 (even 1.6.1) release, always with the same error, i have choose to give up.


Yesterday i got a new server to replace the old one.
the new one run ubuntu 10.4.1 LTS.

I want to state that this installation is totally new and fresh.

I have moved the forum from my old server (running debian etch) to this one.

After that, i import all the db data, everything run smooth and nicely....

so, i choose to give a new try to that...

and, guess what? still the same problem Big Grin


so, really, i can't be the only one, i have already verified this in 2 different setup.


IMHO the problem lies on PHP compatibility, right now i am using
PHP Version 5.3.4 with mysql 5.0.51a

Just to give to you more details, php was compiled on the new ubuntu box, while mysql was installed via apt-get.

Someone have try to do an upgrade of the board from 1.4.X to 1.6.X with php 5.3.4? (on the prev box i had 5.3.3, so maybe the incompatibility lies on php 5.3.X)




Right, PM me FTP login details and database access details. I've posted code that runs code to drop the table before it tries to add it again, and I highly doubt something has changed in PHP 5.3.4 that would have stopped this specific code running.

Have a look at the code yourself...

Quote:[11-Oct-2010 12:48:29] PHP Fatal error: <strong>[SQL] [1060] Duplicate column name 'prefix'</strong><br />ALTER TABLE edk_threads ADD prefix smallint unsigned NOT NULL default '0' AFTER subject in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550

Line 74 of ./install/resources/upgrade17.php:

if($db->field_exists('prefix', 'threads'))
{
	$db->drop_column("threads", "prefix");
}

Line 151 of ./install/resources/upgrade17.php:

$db->add_column("threads", "prefix", "smallint unsigned NOT NULL default '0' AFTER subject");

Drops it before it tries to add it, should not be saying it already exists.

Quote:[11-Oct-2010 12:53:47] PHP Fatal error: <strong>[SQL] [1091] Can't DROP 'allowvideocode'; check that column/key exists</strong><br />ALTER TABLE edk_calendars DROP allowvideocode in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550

Line 114 of ./install/resources/upgrade17.php:

if($db->field_exists('allowvideocode', 'calendars'))
{
	$db->drop_column("calendars", "allowvideocode");
}

Only drops it if it exists, so it checks it exists, sees it does, and then says it doesn't when trying to drop it.

Quote:[11-Oct-2010 12:54:27] PHP Fatal error: <strong>[SQL] [1091] Can't DROP 'referralstype'; check that column/key exists</strong><br />ALTER TABLE edk_promotions DROP referralstype in /home/rama/angelmule/UploadNEW/inc/db_mysql.php on line 550

Line 104 of ./install/resources/upgrade17.php:

if($db->field_exists('referralstype', 'promotions'))
{
	$db->drop_column("promotions", "referralstype");
}

Again, only drops it if it exists, so it checks it exists, sees it does, and then says it doesn't when trying to drop it.

Basically it looks like your installation of PHP has a mind of it's own.

If anyone else has any ideas as to what can cause this I'm all ears, but it's as if your forum is running different code.
just in case....

as i suspected, 5.3.4 was the problem (or at least the incompatibility of mybb with it)

on the same new server, i have switch to 5.2.16 and upgrade worked like a charm.


maybe worth a while to investigate on it if you have some spare time


best regards
Yes, that's true.
MyBB don't works with the new php versions.

I tried to install on localhost, with the latest wampserver.

_http://www.wampserver.com/

- Apache 2.2.17
- Php 5.3.3
- Mysql 5.1.53 (version 64 bits)
- Mysql 5.5.8 (version 32 bits)
- PhpMyadmin 3.2.0.1
- SQLBuddy 1.3.2
Pages: 1 2