Forums | Mahara Community

Support /
LDAP Institution


Ghada El-Zoghbi's profile picture
Posts: 122

26 September 2016, 21:32

Hi Orgonzo,

 

Can you please include the error log for this error - the one that identifies where in the code this query is running (i.e. with the stack trace)?

 

Thanks,

Ghada

 

Oronzo Lezzi's profile picture
Posts: 13

26 September 2016, 22:17

this my log.

I have verified that some users don't have mail

 

 


[INF] dd (auth/ldap/lib.php:2081) ---------- started institution user sync for institution "myInstitution" at Mon, 26 Sep 2016 08:48:08 +0200 ----------
[INF] dd (auth/ldap/lib.php:1087) ---------- started usersync for instance 3 at Mon, 26 Sep 2016 08:48:08 +0200 ----------
[INF] dd (auth/ldap/lib.php:924) retrieving these fields: givenName,sn,mail,mailNickname,cn,sAMAccountName
[INF] dd (auth/ldap/lib.php:924)
.[WAR] dd (auth/ldap/lib.php:966) Ldap record contained no mail field to map to DB email
Call stack (most recent first):
  * log_message(string(size 54), integer, true, true) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:95
  * log_warn(string(size 54)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:966
  * AuthLdap->ldap_get_users_scalable(string(size 23), string(size 11), string(size 274)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:1133
  * AuthLdap->sync_users(false) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:2119
  * auth_ldap_sync_users(string(size 5), null, null, null, null, null, null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:175

[WAR] dd (auth/ldap/lib.php:966) Ldap record contained no mailnickname field to map to DB studentid
Call stack (most recent first):
  * log_message(string(size 66), integer, true, true) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:95
  * log_warn(string(size 66)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:966
  * AuthLdap->ldap_get_users_scalable(string(size 23), string(size 11), string(size 274)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:1133
  * AuthLdap->sync_users(false) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:2119
  * auth_ldap_sync_users(string(size 5), null, null, null, null, null, null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:175

[WAR] dd (auth/ldap/lib.php:966) Ldap record contained no mail field to map to DB email
Call stack (most recent first):
  * log_message(string(size 54), integer, true, true) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:95
  * log_warn(string(size 54)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:966
  * AuthLdap->ldap_get_users_scalable(string(size 23), string(size 11), string(size 274)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:1133
  * AuthLdap->sync_users(false) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:2119
  * auth_ldap_sync_users(string(size 5), null, null, null, null, null, null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:175

[WAR] dd (auth/ldap/lib.php:966) Ldap record contained no mailnickname field to map to DB studentid
Call stack (most recent first):
  * log_message(string(size 66), integer, true, true) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:95
  * log_warn(string(size 66)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:966
  * AuthLdap->ldap_get_users_scalable(string(size 23), string(size 11), string(size 274)) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:1133
  * AuthLdap->sync_users(false) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:2119
  * auth_ldap_sync_users(string(size 5), null, null, null, null, null, null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:175

.
[INF] dd (auth/ldap/lib.php:1139) LDAP users found : 212
[INF] dd (auth/ldap/lib.php:1186) 0 users known to Mahara
[INF] dd (auth/ldap/lib.php:1233) user auto-suspend/delete disabled
[INF] dd (auth/ldap/lib.php:1300) 212 LDAP users unknown to Mahara
[INF] dd (auth/ldap/lib.php:1303) creating user abbinantea
sh: 1: /usr/sbin/sendmail: not found
sh: 1: /usr/sbin/sendmail: not found
[INF] dd (auth/ldap/lib.php:1303) creating user afferrib
sh: 1: /usr/sbin/sendmail: not found
[INF] dd (auth/ldap/lib.php:1303) creating user altieros
sh: 1: /usr/sbin/sendmail: not found
[INF] dd (auth/ldap/lib.php:1303) creating user amatir
sh: 1: /usr/sbin/sendmail: not found
[INF] dd (auth/ldap/lib.php:1303) creating user amorosis
[WAR] dd (lib/errors.php:820) Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?  LIMIT 2' at line 1] in EXECUTE("SELECT * FROM "usr"  WHERE "email" = ?  LIMIT 2")
[WAR] dd (lib/errors.php:820) Command was: SELECT * FROM "usr"  WHERE "email" = ?
Call stack (most recent first):
  * log_message(string(size 320), integer, true, true) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:95
  * log_warn(string(size 320)) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:820
  * SQLException->__construct(string(size 320)) at /var/www/html/mahara-16.04.3/htdocs/lib/dml.php:514
  * get_recordset_sql(string(size 39), array(size 0), integer, integer) at /var/www/html/mahara-16.04.3/htdocs/lib/dml.php:333
  * get_record_sql(string(size 39), array(size 0), integer) at /var/www/html/mahara-16.04.3/htdocs/lib/dml.php:302
  * get_record(string(size 3), string(size 5), null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:1318
  * AuthLdap->sync_users(false) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:2119
  * auth_ldap_sync_users(string(size 5), null, null, null, null, null, null) at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:175

[INF] dd (auth/ldap/lib.php:1343) LDAP (users:0) (updated:0) (unsuspended:0) (created:4) (suspended:0) (deleted:0) (ignored:0) (errors:0)
[WAR] dd (lib/web.php:1898) Cannot modify header information - headers already sent by (output started at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/lib.php:978)
Call stack (most recent first):
  * log_message(string(size 136), integer, true, true, string(size 47), integer) at /var/www/html/mahara-16.04.3/htdocs/lib/errors.php:513
  * error(integer, string(size 136), string(size 47), integer, array(size 6)) at Unknown:0
  * setcookie(string(size 15), string(size 6), string(size 10), string(size 23), string(size 10), false, true) at /var/www/html/mahara-16.04.3/htdocs/lib/web.php:1898
  * set_cookie(string(size 15), string(size 6), string(size 10), true) at /var/www/html/mahara-16.04.3/htdocs/auth/user.php:1532
  * LiveUser->logout() at /var/www/html/mahara-16.04.3/htdocs/auth/ldap/cli/sync_users.php:179

Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?  LIMIT 2' at line 1] in EXECUTE("SELECT * FROM "usr"  WHERE "email" = ?  LIMIT 2")
Command was: SELECT * FROM "usr"  WHERE "email" = ?

Oronzo Lezzi's profile picture
Posts: 13

26 September 2016, 22:52

I solved this issue with this filter

 

php sync_users.php -i='myInstitution' -f=mail=*

 

Thanks for your collaboration

13 results