MyBB Community Forums

Full Version: error on portal.php (phpBB -> MyBB Converter)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,

i've used lobster's phpBB -> MyBB Converter to convert my phpbb to mybb. everything works fine now, excepting the portal.php. i get an error when i try to open the portal.php page in my browser:

Fatal error: Maximum execution time of 30 seconds exceeded in ....\mybb\inc\db_mysql.php on line 43

if i set 'Number of announcements to show' to 0 at the Portal Settings page then i dont get an error. but then i don't see any posts on the portal page.

anyone has an idea how to solve this problem?
this is something Lobster will need to address most probably. Send him a PM directing him to this thread so the next time hes on, he can look into it for you.
i'll do, thanks k776.


this query seems to timeout (line 257, portal.php):
$query = $db->query("SELECT t.*, i.name as iconname, i.path as iconpath, t.username AS threadusername, u.username, u.avatar, p.message FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid = t.icon) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.tid=t.tid AND p.dateline=t.dateline) WHERE 1=1 AND $pids ORDER BY t.dateline DESC LIMIT 0, $settings[portal_numannouncements]");
hmm, it may be because of one tiny bit that was not tranfered properly with the convertor, and it keeps searching for something thats not there, im no expert though! Yeah, I think the best thing to do is wait for Lobsters reply, since myBB's portal page works for me Smile

Welcome to the forum btw.
k776 Wrote:Welcome to the forum btw.

thanks, Smile

i think i have found the problem. if i start the query manually in phpMyAdmin then it takes 68.895 seconds to get an result. not very fast but all data seems to be imported correct.
btw i have about 5800 posts and 1000 threads in the mybb database.

then i've modified the query from:

$query = $db->query("SELECT t.*, i.name as iconname, i.path as iconpath, t.username AS threadusername, u.username, u.avatar, p.message FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid = t.icon) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.tid=t.tid AND p.dateline=t.dateline) WHERE 1=1 AND $pids ORDER BY t.dateline DESC LIMIT 0, $settings[portal_numannouncements]");

to

$query = $db->query("SELECT t.*, i.name as iconname, i.path as iconpath, t.username AS threadusername, u.username, u.avatar, p.message FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid = t.icon) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."posts p ON (p.tid=t.tid AND p.dateline=t.dateline) WHERE 1=1 AND $pids [b]AND t.fid = $settings[portal_announcementsfid] [/b]ORDER BY t.dateline DESC LIMIT 0, $settings[portal_numannouncements]");

now it works fine and i get a result in less the 0.15sec.

i dont know, but maybe its interesting for the developers too.


:o

It's been ages since I've been here Toungue You're pretty lucky you only had this problem a week ago.

If you're editing portal.php to fix this then it's possibly a mybbug not a bug in the converter. The converter doesn't touch any of the mybb files.

I'll have a look at it anyway later this week (I'm afraid I'm quite busy) to see if it could be caused by any unusual database inserts. Hopefully surfi will see this and also confirm whether there's a problem with the code Wink