Last modified: 2013-01-06 11:38:58 UTC
After installing and configuring LdapAuthentification I am prompted with the warning: Warning: Invalid argument supplied for foreach() in /var/lib/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php LdapAuthentification doesn't work. The Ldap-Server isn't queried about groups or users. The wiki is accessible anyway, but no role is applied, all persons accessing the wiki are allowed everything.
Which version?
Also, we need a line number to help, as there are 12 foreach loops in the file
Warning: Invalid argument supplied for foreach() in /var/lib/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1259 Version is: LdapAuthentication-MW1.16-r61987.tar.gz On MediaWiki: mediawiki 1:1.15.1-1ubuntu2.1 mediawiki-extensions 1.6 mediawiki-math 1:1.15.1-1ubuntu2.1
Try the SVN head copy of the Ldap plugin, it's more likely to work Also, you're using an OLD packaged version of mediawiki (which we don't really support custom distro packaged installs, as they have habits of changing stuff)...
Also, a bug isn't really the right spot to ask for support for this. Please use the support page via the extension's documentation.
RESOLVED/INVALID no. I've killed the old installation, installing from scratch, checking out the svn for mediawiki and LdapAuthentification. Now I have installed (as the wiki reports): MediaWiki 1.18alpha (Version 84671) PHP 5.3.2-1ubuntu4.7 (apache2handler) PostgreSQL 8.4.7 LDAP Authentication Plugin (Version 1.2d) (Version 84682) I've tried with lower versions to, but without success -- same error. Only the line number changed.
Additionaly I see lots of: [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined index: XXXXX in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1469, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined offset: 0 in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1496, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined offset: 0 in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1497, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined offset: 0 in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1520, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined offset: 1 in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1527, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten
As far as the documentation goes, I shall be able to list all users and groups by going to: https://srv.example.org/wiki/index.php?title=Spezial%3ABenutzer&username=&group=&limit=50 There are no users and no groups at all shown. Same from commandline (on the very same server): root@zm1:/opt/mediawiki# ldapsearch uid=www-data SASL/GSSAPI authentication started SASL username: admin@EXAMPLE.ORG SASL SSF: 56 SASL data security layer installed. # extended LDIF # # LDAPv3 # base <dc=example,dc=org> (default) with scope subtree # filter: uid=www-data # requesting: ALL # # www-data, System, example.org dn: uid=www-data,ou=System,dc=example,dc=org uid: www-data cn: www-data objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount shadowMax: 99999 shadowWarning: 7 loginShell: /bin/sh uidNumber: 33 gidNumber: 33 homeDirectory: /var/www gecos: www-data # search result search: 5 result: 0 Success # numResponses: 2 # numEntries: 1 The ldap-server supports anonymous binds for a subset of names. I've configured a search proxy, as suggested by others. Same result. The error lines in apaches error log didn't even change.
(In reply to comment #6) > RESOLVED/INVALID no. I marked it invalid not because you aren't experiencing a problem, but because, as Ryan pointed out, what you described was more of a support request than a bug report. Please read at least the first few paragraphs of http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
Since there are [Fri Mar 25 12:37:23 2011] [error] [client 79.229.127.122] PHP Notice: Undefined offset: 1 in /opt/mediawiki/extensions/LdapAuthentication/LdapAuthentication.php on line 1527, referer: https://srv.example.org/wiki/index.php /Spezial:Alle_Seiten And line 1527 is: $groups["short"][] = strtolower( $memAttrs[1] ); At any one point somewhere there is someting wrong with "$memAttrs[1]"
Dude. I don't even track bugs for the extension in here. Go to the support page for help. Seriously. Don't reopen this.
(In reply to comment #10) > At any one point somewhere there is someting wrong with "$memAttrs[1]" But even if Ryan were tracking bugs here, you should open a *new* bug for that issue instead of adding additional issues to this bug. One issue per bug. Please read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html