Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Topic started by: TF_ on March 16, 2004, 10:18:47 AM

Title: upgrading!!
Post by: TF_ on March 16, 2004, 10:18:47 AM
How do I upgrade my YaBB SE 1.4.1 to 1.5.5 forum? Do i replace the upgrade over my old YaBB and then click on upgrade.php in browser? PLesse answer, hurry! My forum is on maintance. And so replace SMF upgrade over the YaBBSE 1.5.5 for upgrading to SMF ?
Title: Re: upgrading!!
Post by: TF_ on March 16, 2004, 10:48:19 AM
I try to upgrade from 1.4.1 to yabb se 1.5.5 now. But it crashed...   >:( >:( >:(

Fatal error: Allowed memory size of 39845888 bytes exhausted (tried to allocate 35 bytes) in /usr/home/sites/mysite/www/forum/upgrade.php on line 219

And it missing the table membername ? Does 1.5.5 use the tabel 'membername' instead of 'members' which YaBB se 1.4.1 use?
Title: Re: upgrading!!
Post by: TF_ on March 16, 2004, 11:16:24 AM
I get error on following line:
$entries[] = "($row[ID_MEMBER], $row[ID_TOPIC], $row[logTime], $row[notificationSent])";

Seems like the table is just too big? I have about 100k posts and 2900 members just making this table too big? is there a walkaround? Do I need log_topics table?

hmm, my array is too big then - I have to rewrite the hole upgrade utility since it can't handle the amount of data I got???
Title: Re: upgrading!!
Post by: Grudge on March 16, 2004, 12:08:22 PM
Umm... I think it *may* be the way php in configured. I think there is a way to define the maximum memory size PHP can allocate - maybe that is set at 4MB? Does it say anything in phpinfo()?
Title: Re: upgrading!!
Post by: TF_ on March 16, 2004, 01:34:10 PM
pretty sure that's the reason, but I have no idea what field that is. PHP is allowed to use 38M memory, that's all I got.


Although, I tried to rewrite the code and it seems that will work ok for me - still executing the code though (a lot of data, 260 thousands rows)

Original code:
$entries = array();
while ($row = mysql_fetch_array($request))
$entries[] = "($row[ID_MEMBER], $row[ID_TOPIC], $row[logTime], $row[notificationSent])";
for ($i = 0; $i < count($entries); $i += $chunkSize)
{
@set_time_limit(300);
echo 'converting log_topics row ' . ($i + 1) .' to ' . min($i + $chunkSize, count($entries)) . '<br />';
doQuery ("REPLACE INTO {$db_prefix}log_topics2 (ID_MEMBER, ID_TOPIC, logTime, notificationSent) VALUES " . implode(',', array_slice($entries, $i, $chunkSize)));
}
doQuery ("DROP TABLE `{$db_prefix}log_topics`");
doQuery ("RENAME TABLE `{$db_prefix}log_topics2` TO `{$db_prefix}log_topics`");


Replaced with:
echo 'converting log_topics now <br />';

@set_time_limit(600);
while ($row = mysql_fetch_array($request)) {
$entries = array($row[ID_MEMBER], $row[ID_TOPIC], $row[logTime], $row[notificationSent]);
doQuery ("REPLACE INTO {$db_prefix}log_topics2 (ID_MEMBER, ID_TOPIC, logTime, notificationSent) VALUES (" . implode(',', $entries) . ");");
}

doQuery ("DROP TABLE `{$db_prefix}log_topics`");
doQuery ("RENAME TABLE `{$db_prefix}log_topics2` TO `{$db_prefix}log_topics`");


worth a shot for the ones that got huuuge dataamounts