Forums | Mahara Community
Support
/
Problem with ldap and/or emailaddress
29 November 2011, 16:46
Hello.
I have quite similar errors in my log that in topic http://mahara.org/interaction/forum/topic.php?id=3599. But that topic does not help me and I couldn't find good hints from here or google. I'll add clip from my error.log to the end of message.
I have Mahara 1.3.7 running on Ubuntu 10.04 with PHP5 5.2.3.
The problem is that user authenticating from ldap can login only once. First login (when mahara creates account) succeeds, mahara asks for email-address and accepts it (it can be seen in users by admin). Every page of mahara seem to work as they should and I found no errors from logs this far.
But when that users tries to log in next time, mahara gives an error: "Mahara: Site unavailable A nonrecoverable error occured. This probably means you have encountered a bug in the system"
If I delete the user from mahara, same thing happens again: first login ok, second fails.
Admin and users that were created manually can login.
We have no email-addresses in AD, so I have left that field empty in Institution ldap-settings. But, like i wrote, mahara asks for email and stores it correctly (?) so I don't understand why there seems to be something wrong with it in error.log.
Moodle on same server does fine authenticating users from same AD.
Ville Pöntinen
Tail from /var/log/apache2/error.log:
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (auth/ldap/lib.php:134) Undefined index: email, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] Call stack (most recent first):, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * log_message("Undefined index: email", 8, true, true, "/var/www/mahara/auth/ldap/lib.php", 134) at /var/www/mahara/lib/errors.php:444, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * error(8, "Undefined index: email", "/var/www/mahara/auth/ldap/lib.php", 134, array(size 11)) at /var/www/mahara/auth/ldap/lib.php:134, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * AuthLdap->authenticate_user_account(object(stdClass), "passwd_of_testuser") at /var/www/mahara/auth/user.php:979, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * LiveUser->login("testuser", "passwd_of_testuser") at /var/www/mahara/auth/lib.php:1143, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * call_user_func_array("login_submit", array(size 2)) at /var/www/mahara/lib/pieforms/pieform.php:512, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * Pieform->__construct(array(size 8)) at /var/www/mahara/auth/lib.php:474, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * auth_setup() at /var/www/mahara/init.php:246, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * require("/var/www/mahara/init.php") at /var/www/mahara/index.php:32, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] , referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (auth/ldap/lib.php:135) Undefined index: email, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] Call stack (most recent first):, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * log_message("Undefined index: email", 8, true, true, "/var/www/mahara/auth/ldap/lib.php", 135) at /var/www/mahara/lib/errors.php:444, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * error(8, "Undefined index: email", "/var/www/mahara/auth/ldap/lib.php", 135, array(size 11)) at /var/www/mahara/auth/ldap/lib.php:135, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * AuthLdap->authenticate_user_account(object(stdClass), "passwd_of_testuser") at /var/www/mahara/auth/user.php:979, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * LiveUser->login("testuser", "passwd_of_testuser") at /var/www/mahara/auth/lib.php:1143, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * call_user_func_array("login_submit", array(size 2)) at /var/www/mahara/lib/pieforms/pieform.php:512, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * Pieform->__construct(array(size 8)) at /var/www/mahara/auth/lib.php:474, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * auth_setup() at /var/www/mahara/init.php:246, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * require("/var/www/mahara/init.php") at /var/www/mahara/index.php:32, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] , referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (lib/errors.php:743) Failed to get a recordset: mysql error: [1452: Cannot add or update a child row: a foreign key constraint fails ("mahara"."artefact_internal_profile_email", CONSTRAINT "arteinteprofemai_art_fk" FOREIGN KEY ("artefact") REFERENCES "artefact" ("id"))] in EXECUTE("INSERT INTO "artefact_internal_profile_email" ("owner", "email", "verified", "principal", "artefact") VALUES ('7', '[email protected]', 1, 1, '26')"), referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (lib/errors.php:743) Command was: INSERT INTO "artefact_internal_profile_email" ("owner", "email", "verified", "principal", "artefact") VALUES (?, ?, ?, ?, ?) and values was (7,[email protected],1,1,26), referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] Call stack (most recent first):, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * log_message("Failed to get a recordset: mysql error: [1452: Can...", 8, true, true) at /var/www/mahara/lib/errors.php:109, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * log_warn("Failed to get a recordset: mysql error: [1452: Can...") at /var/www/mahara/lib/errors.php:743, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * SQLException->__construct("Failed to get a recordset: mysql error: [1452: Can...") at /var/www/mahara/lib/dml.php:1069, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * insert_record("artefact_internal_profile_email", object(stdClass)) at /var/www/mahara/artefact/internal/lib.php:565, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * ArtefactTypeEmail->commit() at /var/www/mahara/lib/user.php:226, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * set_profile_field("7", "email", null) at /var/www/mahara/auth/ldap/lib.php:136, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * AuthLdap->authenticate_user_account(object(stdClass), "passwd_of_testuser") at /var/www/mahara/auth/user.php:979, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * LiveUser->login("testuser", "passwd_of_testuser") at /var/www/mahara/auth/lib.php:1143, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * call_user_func_array("login_submit", array(size 2)) at /var/www/mahara/lib/pieforms/pieform.php:512, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * Pieform->__construct(array(size 8)) at /var/www/mahara/auth/lib.php:474, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * auth_setup() at /var/www/mahara/init.php:246, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * require("/var/www/mahara/init.php") at /var/www/mahara/index.php:32, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] , referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (lib/dml.php:1069) Failed to get a recordset: mysql error: [1452: Cannot add or update a child row: a foreign key constraint fails ("mahara"."artefact_internal_profile_email", CONSTRAINT "arteinteprofemai_art_fk" FOREIGN KEY ("artefact") REFERENCES "artefact" ("id"))] in EXECUTE("INSERT INTO "artefact_internal_profile_email" ("owner", "email", "verified", "principal", "artefact") VALUES ('7', '[email protected]', 1, 1, '26')"), referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] [WAR] 46 (lib/dml.php:1069) Command was: INSERT INTO "artefact_internal_profile_email" ("owner", "email", "verified", "principal", "artefact") VALUES (?, ?, ?, ?, ?) and values was (7,[email protected],1,1,26), referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] Call stack (most recent first):, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * insert_record("artefact_internal_profile_email", object(stdClass)) at /var/www/mahara/artefact/internal/lib.php:565, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * ArtefactTypeEmail->commit() at /var/www/mahara/lib/user.php:226, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * set_profile_field("7", "email", null) at /var/www/mahara/auth/ldap/lib.php:136, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * AuthLdap->authenticate_user_account(object(stdClass), "passwd_of_testuser") at /var/www/mahara/auth/user.php:979, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * LiveUser->login("testuser", "passwd_of_testuser") at /var/www/mahara/auth/lib.php:1143, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * call_user_func_array("login_submit", array(size 2)) at /var/www/mahara/lib/pieforms/pieform.php:512, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * Pieform->__construct(array(size 8)) at /var/www/mahara/auth/lib.php:474, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * auth_setup() at /var/www/mahara/init.php:246, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] * require("/var/www/mahara/init.php") at /var/www/mahara/index.php:32, referer: http://www.xxxxxx.fi/mahara/
[Wed Nov 30 00:10:58 2011] [error] [client 193.184.117.254] , referer: http://www.xxxxxx.fi/mahara/
2 posts by Account deleted were deleted