MyBB Community Forums

Full Version: mybb installer crashing after data insertion step
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I've been trying to install mybb on my freehostia webspace for about 3 hours now, but no matter what I do, the mybb webinstaller "crashes" after I click the next button on the 'data insertion' step in the installer.

Chrome (tested IE as well) chuggs for a while, and then just displays a "No data received" error.

I'm trying to install mybb version 1.6 (latest afaik, installer says 1610).
MySQL version is 5.5.16

I have no clue as how to further debug this. I've also tried installing some other forum software, but it fails in a similar way (it seems to connect to the database, but when trying to populate it fails). I'm not sure if it's the same error myBB is getting. MyBB is doing something correctly with the database at least, as I can see it creating several tables in the DB.

Does anyone have an idea of what I can do to diagnose what is going wrong?

Best regards,
/Temaran

After debugging as best I can (I have 0 xp with PHP), I've discovered that it's crashing on line 1707 in index.php in the installer.

The call on this line is:
$theme_id = import_theme_xml($contents, array("templateset" => -2, "version_compat" => 1));

I'm going to try and investigate further, but I welcome any info from ppl who know php / mybb in general -_-

Okay, so I have almost no experience with web programming
but to me it right now seems that the browser must be timing out before the php script completes execution, which is why I'm getting the chrome "No data received" message.

I found this in a loop in the import_theme_xml function:
// PostgreSQL causes apache to stop sending content sometimes and
// causes the page to stop loading during many queries all at one time

Now, I'm not using postgreSQL, but it sure seems like the symptoms I'm having. unfortunately, executing what that comment was pointing at every loop still didnt fix the problem. Maybe it will work if I can make the timeout time of chrome longer or something...
Is there anything related in your error log? (You may find this somewhere in your hosting control panel)
(2013-06-08, 08:18 AM)Polarbear541 Wrote: [ -> ]Is there anything related in your error log? (You may find this somewhere in your hosting control panel)

Hello!

No, I've tried to find such a thing, there are "php settings" but the only error related setting is one setting where you can toggle "php errors in browser". I've left this on, but it doesn't seem to warn me in any way. I've been debugging it so far by using the "file_put_contents" and "file_get_contents" semantics to create a rudimentary file logger ^^;

Another suspicious setting is the "max_execution_time" setting for php scripts though, and I've tried to set this way up (like 500secs). I don't think this is it though, since I'm pretty sure the script executes to completion server side. If I periodically poll my ad hoc log file on the server, I can see it outputting more trace logs even after my browser has "timed out".

My previous statement that:
$theme_id = import_theme_xml($contents, array("templateset" => -2, "version_compat" => 1));
was causing trouble was false. I just assumed that the the last this last log I got just after my browser timed out had to also mean that the script wasn't executing anymore. But as I mentioned, if I wait more after I've timed out, I can see that more and more trace messages keep accruing in the log file.

My current running theory is that the execution of that great big old copy operation is so slow that the browser is timing out, and when the script runs to completion, I can't refresh it, since that will take me back to the start of the installation process. I've tried downloading firefox since I found out you could set the timeouts in about:config there, but setting both;

network.http.connection-timeout and
network.http.keep-alive.timeout

to 600 seconds still has no effect.

I think the root cause has to be my database though. It's running on an old laptop which is probably a lot slower than the fancy hosted mysql databases ppl use when setting this forum software up.
I'm already using my allotted hosted database for another purpose though, so I can't use that one... :/

Well if definately seems like a timeout problem on the browser side.
Removing the forloop on line 171

foreach($templatecache as $template)

fixes the problem.
Limiting it to a few iterations also fixes the problem.
I just don't get why the echo " "; Flush(); isn't keeping the browser session alive :o