I'm importing about 4100 users and 38000 posts. The categories and topics import fine (there is fewer of them) but the users and posts timeout after about 15 minutes. After the timeout, I see about 60-70% have been converted. I've tried this on a web server I setup on my personal computer and on the web server of my hosting company (myhosting.com) with minimal difference in result.

The main page says the script doesn't automatically reinitiate the script when it times out. So how do I reinitiate it manually? I try running the import again and sometimes it will pick up a handful more users or posts, but not enough to make a difference.

I appreciate any help I can get!

CommentFileSizeAuthor
#2 screenshot.JPG93.48 KBjames_w

Comments

naheemsays’s picture

To get a larger timeout, put a larger value in the settings page(misc section). (default value is 1200(seconds) = 20 mins)

To reinitiate, go to the execute page, re select what was being imported (users/topic/comments) and click import. There will be no duplication as the module checks if the stuff has already been imported.

james_w’s picture

StatusFileSize
new93.48 KB

So I increased the timeout to 7200. I still get a page now found error after 10-15 minutes, but it seems as if the script keeps running. After two hours it still hasn't converted all of my users, but it did convert more than it did before. I've reinitiated the script several times, each time it gets a few more users than it did before.

The "Last Accessed" time of each user appears to be getting updated with the time that the user was converted, and the users appear to getting converted in the order of which they joined the boards, with the oldest converting first.

I attached a screenshot of what it looks like. The "Last Accessed" time increments by 30 secs to 75 secs or so between each user, so it is like its taking 30-75 seconds to convert each user. Why would it be taking so long, if thats the case?

I appreciate your help!

Edit: Something I just took into consideration:
This forum was originally an SMF forum. I had to convert it to phpBB so I could convert it to Drupal. When converting SMF to phpBB, the passwords do not convert properly because they are salted in SMF. So I assume when then converting from phpBB to Drupal, the passwords are also not converted properly. When the conversion is done, the plan is to have everyone reset their password via the "Request new password" link. Is it possible that the format the password is in is causing the users an abnormally long time to convert? If so, is there an edit I can make to the module that will insert the same password for every user, instead of trying to convert the password? I understand the basic logic of most programming languages, but am not familiar with PHP syntax.

Thanks Again!

naheemsays’s picture

Which version are you using? 6.x1.0?

User import should NOT really take too long. On my rig when I used this module, I did about 2000 users (1600 of which were deleted) in around 2 minutes.

Are you sure the database is getting enough memory? (I am not an expert on databases...) Also if the php is timing out, maybe it is in safe mode (with an extremely high default value)? This module does not change the timeout value in safemode.

To cut down churn, in phpbb2drupal.module, you can modify this line:

<?php
$user_ids = db_query('SELECT user_id FROM %susers WHERE user_id > 2 ORDER BY user_id', $pre);
?>

replace the number 2 with the highest value in the user_id column in the phpbb2drupal_temp_user column. for a more programmatic solution, replace the above with something like

<?php
$imported = db_result(db_query(('SELECT max(user_id) FROM {phpbb2drupal_temp_user}'));
if (!($imported > 2))  {
$imported = 2;
}
$user_ids = db_query('SELECT user_id FROM %susers WHERE user_id > %d ORDER BY user_id', $pre, $imported);
?>

(Not tested, and I am making a massive asumption that the max statement 1: works, 2: gets the largest value from that table.)

james_w’s picture

I am using 6.2 (the one released a few days ago). Thanks for the reply.. I could have sworn I posted this last night but maybe I typed it up and forgot... hah.

Anyway I got the conversion to work by making the following adjustments:

Because I don't really care about most of the profile data, I commented the following lines as shown and changed the password to 32 character encrypted password that I came up with, so all users have the same password that they will have to reset by using the Request New Password feature.

    $data = array(
      'name' => substr($user->username, 0, 60),
      'pass' => substr("XXX", 0, 32),
      'mail' => substr($user->user_email, 0, 64),
      //'signature' => substr(" ", 0, 255),
      'created' => $user_regdate,
      'access' => $user_session_time,
      'login' => $user_lastvisit,
      'status' => $user->user_active,
      'timezone' => $user->user_timezone, 
      //'picture' => $user->user_avatar,
      'init' => substr($user->user_email, 0, 64),
      'roles' => array(0 => 2),                       # Authenticated User
      //'user_website' => $user->user_website,
      //'user_from' => $user->user_from,
      //'user_icq' => $user->user_icq,
      //'user_aim' => $user->user_aim,
      //'user_yim' => $user->user_yim,
      //'user_msnm' => $user->user_msnm,
      //'user_occ' => $user->user_occ,
      //'user_interests' => $user->user_interest
      );

The only thing I can see that caused this was either a) the password issue I mentioned earlier, or b) the pictures directory in my drupal config is having a permission issue and hasn't been created yet. (I haven't looked into this yet, will later) So maybe it was running into a problem in converting the avatars.

I definitly appreciate your time, and am happy this module was able to work out for me.

naheemsays’s picture

It may have been avatars, but passwords are pretty simple - it does a direct copy from database to database.

Both Drupal (5 and 6) AND phpBB2 use MD5 strings. they are exactly the same so you can copy them over without any changes.

(phpBB3 uses phpass, which is being adopted for Drupal 7.)

james_w’s picture

Status: Active » Closed (fixed)