Invalid argument supplied for foreach() user_import.module on line 1336

kenorb - July 21, 2009 - 15:08
Project:User Import
Version:6.x-2.3
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

I've found it in logs during user import.
URL: admin/user/user_import/import/2

#1

kenorb - July 21, 2009 - 15:11

<?php
function _user_import_update_user_check($settings) {
  foreach (
$settings as $setting) {
?>

when this function is executed?

#2

scottrigby - September 14, 2009 - 20:25

Same error here, when importing a pretty large file though (80,000 users) - not sure if the size has any impact...

#3

Robert Castelo - September 20, 2009 - 09:36
Status:active» fixed

Can you please test on User Import 6.2.1 and re-open this issue if it still exists.

#4

birdy - September 25, 2009 - 10:39

Same problem here but on line 1336 ? I don't know if it's the same problem.
For me, this error appears when I try to import a CSV with duplicate email in it. Btw, I can see it in error log: "duplicate email". I think User Import check your CSV to see if an email isn't already in database, but it's not checking if you have a mail twice in your CSV.

#5

Robert Castelo - September 25, 2009 - 12:28

Is this still an issue in User Import 6.2.2?

#6

birdy - September 25, 2009 - 13:17

I use 6.2.2.

#7

Robert Castelo - September 25, 2009 - 13:31
Version:6.x-2.x-dev» 6.x-2.2

#8

Robert Castelo - September 25, 2009 - 13:32
Status:fixed» active

#9

tripngroove - October 8, 2009 - 06:13

I'm using 6.x-2.2 and still getting this error.
Any ideas for a temporary fix?

#10

tetramentis - November 6, 2009 - 11:24
Title:Invalid argument supplied for foreach() user_import.module on line 1331» Invalid argument supplied for foreach() user_import.module on line 1336
Version:6.x-2.2» 6.x-2.3

I had 10 errors of this kind while importing 2721 users in chunks of 250 - that is, 1 error per "continue processing" page, except for the first processed page. Other than this message, import was successful - i.e. with no duplicate emails or something like that.

#11

tetramentis - November 6, 2009 - 11:41

After setting "users per process" to 3000, and performing users import in one run - there were no "invalid argument" messages at all.
I believe this could be a temporary workaround :) - that is, setting "users per process" to a value higher than the number of users. Just don't forget to tweak PHP's max_execution_time, if you are importing lots of users.

#12

acwWeb - November 25, 2009 - 20:59

I set my max value to 1000 for an import of only 300 and I still get the error message. It only imported about 80 of the users. Any help would be greatly appreciated.

FYI - I looked for a max_execution_time in phpMyAdmin and found nothing.

#13

tetramentis - November 29, 2009 - 10:42

max_execution_time is a PHP configuration parameter, usually found in the php.ini file. By default, it is set to 30 seconds - any script running longer than that will be terminated. I believe time is measured by CPU time, so under heavy load observed wall-clock time will be over 30 seconds.

Import of 3k users took somewhere between 60 and 180 seconds on my 3GHz system (do not quite remember).

 
 

Drupal is a registered trademark of Dries Buytaert.