Last modified: 2013-01-06 11:38:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30217, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28217 - LdapAuthentication.php not querying the LDAP-Server
LdapAuthentication.php not querying the LDAP-Server
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
LdapAuthentication (Other open bugs)
unspecified
All All
: Normal critical (vote)
: ---
Assigned To: Ryan Lane
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-24 12:25 UTC by Thomas Schweikle
Modified: 2013-01-06 11:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Thomas Schweikle 2011-03-24 12:25:24 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.
Comment 1 Sam Reed (reedy) 2011-03-24 12:26:09 UTC
Which version?
Comment 2 Sam Reed (reedy) 2011-03-24 12:27:42 UTC
Also, we need a line number to help, as there are 12 foreach loops in the file
Comment 3 Thomas Schweikle 2011-03-24 12:39:42 UTC
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
Comment 4 Sam Reed (reedy) 2011-03-24 12:42:46 UTC
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)...
Comment 5 Ryan Lane 2011-03-24 17:33:21 UTC
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.
Comment 6 Thomas Schweikle 2011-03-25 11:39:40 UTC
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.
Comment 7 Thomas Schweikle 2011-03-25 11:47:00 UTC
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
Comment 8 Thomas Schweikle 2011-03-25 11:56:46 UTC
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.
Comment 9 Mark A. Hershberger 2011-03-25 14:51:49 UTC
(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
Comment 10 Thomas Schweikle 2011-03-25 17:21:47 UTC
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]"
Comment 11 Ryan Lane 2011-03-25 17:23:04 UTC
Dude. I don't even track bugs for the extension in here. Go to the support page for help. Seriously. Don't reopen this.
Comment 12 Mark A. Hershberger 2011-03-25 17:39:26 UTC
(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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links