Forums | Mahara Community

Support /
LDAP Authentication Problem, Mahara 1.2.9 - MS Active Directory


anonymous profile picture
Account deleted
Posts: 2

14 June 2012, 12:59

I have configured LDAP Authentication but when I intend to login with an account of my domain an error message is displayed: "You have not provided the correct credentials to log in. Please check your username and password are correct."

In my error_log I see this entries:

[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] [WAR] 6a (auth/session.php:237) setcookie() expects at most 6 parameters, 7 given, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] Call stack (most recent first):, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * log_message("setcookie() expects at most 6 parameters, 7 given", 8, true, true, "/html/portfolio/htdocs/auth/sessi...", 237) at /html/portfolio/htdocs/lib/errors.php:446, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * error(2, "setcookie() expects at most 6 parameters, 7 given", "/html/portfolio/htdocs/auth/sessi...", 237, array(size 0)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * setcookie("mahara", "", 1339628206, "/portfolio/htdocs/", "", "", "") at /html/portfolio/htdocs/auth/session.php:237, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * Session->destroy_session() at /html/portfolio/htdocs/auth/lib.php:1158, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * call_user_func_array("login_submit", array(size 2)) at /html/portfolio/htdocs/lib/pieforms/pieform.php:430, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * Pieform->__construct(array(size 8)) at /html/portfolio/htdocs/auth/lib.php:474, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * auth_setup() at /html/portfolio/htdocs/init.php:244, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * require("/html/portfolio/htdocs/init.php") at /html/portfolio/htdocs/index.php:32, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] , referer: http://MYDOMAIN/portfolio/htdocs/

[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] [WAR] 6a (auth/ldap/lib.php:240) ldap_search() [function.ldap-search]: Search: Operations error, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] Call stack (most recent first):, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * log_message("ldap_search() [function.ldap-search]: Search: Oper...", 8, true, true, "/html/portfolio/htdocs/auth/ldap/...", 240) at /html/portfolio/htdocs/lib/errors.php:446, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * error(2, "ldap_search() [<a href='function.ldap-search'>func...", "/html/portfolio/htdocs/auth/ldap/...", 240, array(size 5)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * ldap_search(resource(#44), "ou=Administrativos,dc=ua,dc=reduniv,dc=org", "(cn=my_ldap_user)", array(size 1)) at /html/portfolio/htdocs/auth/ldap/lib.php:240, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * AuthLdap->ldap_find_userdn(resource(#44), "my_ldap_user") at /html/portfolio/htdocs/auth/ldap/lib.php:109, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * AuthLdap->authenticate_user_account(object(LiveUser), "my_ldap_user_pass") at /html/portfolio/htdocs/auth/lib.php:1181, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * call_user_func_array("login_submit", array(size 2)) at /html/portfolio/htdocs/lib/pieforms/pieform.php:430, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * Pieform->__construct(array(size 8)) at /html/portfolio/htdocs/auth/lib.php:474, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * auth_setup() at /html/portfolio/htdocs/init.php:244, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * require("/html/portfolio/htdocs/init.php") at /html/portfolio/htdocs/index.php:32, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] , referer: http://MYDOMAIN/portfolio/htdocs/

[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] [WAR] 6a (auth/ldap/lib.php:249) ldap_first_entry(): supplied argument is not a valid ldap result resource, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] Call stack (most recent first):, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * log_message("ldap_first_entry(): supplied argument is not a val...", 8, true, true, "/html/portfolio/htdocs/auth/ldap/...", 249) at /html/portfolio/htdocs/lib/errors.php:446, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * error(2, "ldap_first_entry(): supplied argument is not a val...", "/html/portfolio/htdocs/auth/ldap/...", 249, array(size 6)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * ldap_first_entry(resource(#44), false) at /html/portfolio/htdocs/auth/ldap/lib.php:249, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * AuthLdap->ldap_find_userdn(resource(#44), "my_ldap_user") at /html/portfolio/htdocs/auth/ldap/lib.php:109, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * AuthLdap->authenticate_user_account(object(LiveUser), "my_ldap_user_pass") at /html/portfolio/htdocs/auth/lib.php:1181, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * login_submit(object(Pieform), array(size 6)) at Unknown:0, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * call_user_func_array("login_submit", array(size 2)) at /html/portfolio/htdocs/lib/pieforms/pieform.php:430, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * Pieform->__construct(array(size 8)) at /html/portfolio/htdocs/auth/lib.php:474, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * auth_setup() at /html/portfolio/htdocs/init.php:244, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21]   * require("/html/portfolio/htdocs/init.php") at /html/portfolio/htdocs/index.php:32, referer: http://MYDOMAIN/portfolio/htdocs/
[Thu Jun 14 12:09:02 2012] [error] [client 172.19.29.21] , referer: http://MYDOMAIN/portfolio/htdocs/

 

My LDAP plugin configuration is:

Authority name *: ldapaccess

Host URL * : ldap://my.localdomain.org

Context: ou=Administrativos,dc=my,dc=localdomain,dc=org

User type *: MS ActiveDirectory

User attribute *: cn

Search subcontexts *: Yes

LDAP version *: 2

We auto-create users: (ticked)

 

Can anyone help me solve this problem?

Kind regards

anonymous profile picture
Account deleted
Posts: 48

14 June 2012, 17:04

Hi Dario,

 

It looks like there is a problem with your PHP version. The first error "setcookie() expects at most 6 parameters, 7 given" makes me think this. The manual page for setcookie shows 7 parameters, http://php.net/manual/en/function.setcookie.php.

The rest of the error messages look like they are too do with the ldap not working, which could be due to the setcookie problem.

 

Cheers,

 

Hugh

anonymous profile picture
Account deleted
Posts: 2

19 June 2012, 9:20

Hugh

Thanks for the information. I will test with a newer version of PHP.

Regards.

anonymous profile picture
Account deleted
Posts: 8

16 July 2012, 1:29

Hello,

 

I got the same error but without setcookie, so please tell me about LDAP operational error. How can I rectify that error using LDAP authentication.

 

 

Thanks

4 results