Hello,

I've got a company intranet set up with ~1200 registered users. However we have an issue with a number of users in that they are unable to access the site. Their browser just times out when trying to access the site.

Looking at the drupal logs page reveals;

php	17/11/2006 - 11:31	Invalid argument supplied for foreach() in ...	Anonymous 
php	17/11/2006 - 11:31	You have an error in your SQL syntax; check the manual ...	Anonymous 
php	17/11/2006 - 11:31	implode() [	Anonymous 	
php	17/11/2006 - 11:31	array_keys() [	Anonymous 	
user	17/11/2006 - 11:31	new user: (webserver_auth)

repeating hundreds of times over.

The one thing in common with these users is that they have utf8 characters in their username such as ä, Ñ, and ô.

Checking the error.log file reveals these telling errors;

PHP Warning:  Data too long for column 'message' at row 1\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', 'Data too long for column 'name' at row 1\\nquery: INSERT INTO users (name, pass, init, status, created, uid) VALUES ('tesUml\xe4ut2', '6411532ba4971f378391776a9db629d3', 'CE\\\\\\\\\\\\\\\\tesUml\xe4ut2', 1, 1163763073, 771) in D:\\\\webroot\\\\intranet_dev\\\\includes\\\\database.mysql.inc on line 120.', 2, '', 'http://ukwr-portal.uk.europe.pall.com/dev/?destination=', '', '10.129.3.21', 1163763073) in D:\\webroot\\intranet_dev\\includes\\database.mysql.inc on line 120

[Fri Nov 17 11:31:14 2006] [error] [client 10.129.3.21] PHP Warning:  Data too long for column 'message' at row 1\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', 'Data too long for column 'authname' at row 1\\nquery: INSERT INTO authmap (authname, uid, module) VALUES ('tesUml\xe4ut2', 0, 'webserver_auth') in D:\\\\webroot\\\\intranet_dev\\\\includes\\\\database.mysql.inc on line 120.', 2, '', 'http://ukwr-portal.uk.europe.pall.com/dev/?destination=', '', '10.129.3.21', 1163763074) in D:\\webroot\\intranet_dev\\includes\\database.mysql.inc on line 120

again, repeating hundreds of times over.

I have picked apart the Webserver_auth code and can see that the user is not being created when user_save is called. So when the user is sent to the destination page the process is repeated over and over. This explains the empty 'new user: (webserver_auth)' watchdog line.

I have altered the webserver_auth code to use the drupal_unicode string function drupal_substr() but this have not changed anything.

The database is set to use UTF8 and the query;
INSERT INTO users (name, pass, init, status, created, uid) VALUES ('tesUmläut2', '6411532ba4971f378391776a9db629d3', 'CE\tesUmläut2', 1, 1163761342, 701);
works fine when entered using the MySQL Query Administrator. This query is as near as I can figure it the same as the one drupal is attempting to use.

Not sure where to move with this. It absolutely NEEDS to work or the whole drupal project may need re-thinking.

Many pre-emptive thanks
Adam

Comments

moshe weitzman’s picture

maybe individual DB tables don't have utf8 encoding? I don't have any ideas here. I suggest speaking with Steven Wittens (UnConeD) since he is our unicode guru.

If the problem is just insert, then you could create Drupal accounts for them manually with SQL queries.