Advertisement:

Author Topic: upgrading!!  (Read 5656 times)

Offline TF_

  • Semi-Newbie
  • *
  • Posts: 87
  • Gender: Male
  • I'm a llama!
upgrading!!
« 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 ?

Offline TF_

  • Semi-Newbie
  • *
  • Posts: 87
  • Gender: Male
  • I'm a llama!
Re: upgrading!!
« Reply #1 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?

Offline TF_

  • Semi-Newbie
  • *
  • Posts: 87
  • Gender: Male
  • I'm a llama!
Re: upgrading!!
« Reply #2 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???
« Last Edit: March 16, 2004, 11:19:57 AM by TF_ »

Offline Grudge

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,742
  • Gender: Male
  • Unofficial nuisance
Re: upgrading!!
« Reply #3 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()?
I'm only a half geek really...

Offline TF_

  • Semi-Newbie
  • *
  • Posts: 87
  • Gender: Male
  • I'm a llama!
Re: upgrading!!
« Reply #4 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:
Code: [Select]
$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:
Code: [Select]
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