I'm currently converting a live board from MyBB 1.4.13 to 1.6. I deactivated plugins, set the board as offline, and uploaded the files - however, the installer is now stopping during the IP Repair Conversion.
When the screen shows:
Quote:Repairing ip 70000 to 75000 (434244 Total)
There is no next button, javascript redirect, or anything like it. I can restart (edited) install.php, but it persistently stops here.
I'm probably being really stupid about something, but help would be very greatly appreciated.
install.php? You should be using upgrade.php
My bad, I meant to say upgrade.php. That's what I'm using.
if there's a bad ipaddress entry somewhere, the upgrade would fail on a query. try wrapping the my_ip2long in intval().
in install/resource/upgrade17.php
$db->update_query("posts", array('longipaddress' => my_ip2long($post['ipaddress'])), "pid = '{$post['pid']}'");
replace with
$db->update_query("posts", array('longipaddress' => intval(my_ip2long($post['ipaddress']))), "pid = '{$post['pid']}'");
I made that change but I'm afraid it still stops there. Maybe this could have something to do with having converted from a free forum to phpBB to MyBB. I'll keep trying.
Hm, and you don't get any error message?
You'd have to add some debug messages then, to find out where it stops exactly...
No - rather than continuing and redirecting it just stops right under "Repairing ip 70000 to 75000 (434244 Total)".
I guess I'll try to do that, then. It worked flawlessly on a similar copy, but just not on the live version.
This still isn't working and I'm rather worried; any help would be greatly appreciated.
Do you think you can ask your host to see if it's generating any errors but hiding them for some reason? Would be good to know if it's an error.
Can you also tell me how long you wait for the page to load until it "stops" as you say? It might be timing out.
I think I just found out what's going wrong. The host has a 'max_questions' limit, which seems to be the number of queries the domain can run each hour. It's set to 75,000, which makes a lot of sense as to why it's stopping between 70,000 and 75,000.
My guess is that because there are so many queries, I'm not going to manage it going through all of the posts and converting their IPs on the website. I'm going to try exporting the database, then running through the conversion script on localhost.
Assuming that some members have static ip addresses and some members made more than just one post using the same ip address, you could reduce the number of queries considerably.
pseudo code:
SELECT ipaddress FROM mybb_posts GROUP BY ipaddress (returns only unique ipadresses)
... calculate ip2long for each of them ...
UPDATE mybb_posts SET longipaddress=x WHERE ipaddress=y
In my own forum this alone would cut down the number of queries by more than half.
As an additional step you could also select MIN(longipaddress), MAX(longipaddress) (min max due to GROUP BY) in the first query, and only run the update query if either of them is not the correct value. This may actually reduce the number of queries from >75k to 1 if you already had the correct values there anyway.