-
-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to a member function user() on null #1551
Comments
In your ldap, are your users defined with "mail", "givenname" and "sn"? |
Hi. Yes they are. In fact, the error shown above happens after ldap return with success match of user-pass. The problem is the function user() not existing in php's eyes Thanks in advance for your help. |
This function is defined in ldap library. |
Good suggestion, Prior to opening this ticket, I've uploaded the files twice and made a diff of webserver folder and uploaded unzipped copy. All identical. |
I don't understand. In adLDAP.php, declaration is And other users made it work. Perhaps is there something wrong in ldap configuration? I'm very bad in ldap so it is not easy to help here. |
Hi. Sorry to say that "PHP Fatal error: Uncaught Error: Call to a member function user() on null in " is PHP server and code related. LDAP query was done before reaching this point. As you said, the function is public, but the object may not be global. I'll have to look into that. It's probably an object scope problem. Well... It HAS to be. Regards. Marc. |
The issue was that adLDAP wasn't being used at all because it's only used when authenticating with Active Directory, not with "posix-search". |
Absolutely correct! Thank you @radioactiv . |
why the error message then? These are, I think, legitimate questions that need answer. I'll have to Please advise. Marc. Marc. On Oct 22, 2016 2:41 AM, "Nils Laumaillé" notifications@github.com wrote: Absolutely correct! Thank you @radioactiv https://github.com/radioactiv . — |
Ok. I don't have time to check and report back? Marc. On Oct 23, 2016 11:19 AM, "Nils Laumaillé" notifications@github.com wrote: — |
Steps to reproduce
Expected behaviour
Let the user log in
Actual behaviour
apache error logs produce this at every login attemps:
[Thu Oct 13 16:20:46.650533 2016] [fcgid:warn] [pid 63232] [client 1.1.1.1:60844] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function user() on null in /home/teampamtmhyeb9zazvti/public_html/sources/identify.php:395, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650565 2016] [fcgid:warn] [pid 63232] [client 1.1.1.1:60844] mod_fcgid: stderr: Stack trace:, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650569 2016] [fcgid:warn] [pid 63232] [client 1.1.1.1:60844] mod_fcgid: stderr: #0 /home/teampamtmhyeb9zazvti/public_html/sources/identify.php(87): identifyUser('nuz/VxcXFxc/d/z...'), referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650573 2016] [fcgid:warn] [pid 63232] [client 1.1.1.1:60844] mod_fcgid: stderr: #1 {main}, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650577 2016] [fcgid:warn] [pid 63232] [client 1.1.1.1:60844] mod_fcgid: stderr: thrown in /home/teampamtmhyeb9zazvti/public_html/sources/identify.php on line 395, referer: http://teampass.readycomputing.com/index.php?page=items
while ldap logs produce valid searches:
[13/Oct/2016:16:20:46 -0400] conn=34 fd=65 slot=65 connection from 127.0.0.1 to 127.0.0.1
[13/Oct/2016:16:20:46 -0400] conn=34 op=0 BIND dn="cn=directory manager" method=128 version=3
[13/Oct/2016:16:20:46 -0400] conn=34 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="cn=directory manager"
[13/Oct/2016:16:20:46 -0400] conn=34 op=1 SRCH base="ou=People,dc=readycomputing,dc=com" scope=2 filter="(&(uid=test1)(objectClass=person))" attrs="distinguishedName"
[13/Oct/2016:16:20:46 -0400] conn=34 op=1 RESULT err=0 tag=101 nentries=1 etime=0
[13/Oct/2016:16:20:46 -0400] conn=34 op=2 SRCH base="ou=People,dc=readycomputing,dc=com" scope=2 filter="(memberUid=test1)" attrs="distinguishedName"
[13/Oct/2016:16:20:46 -0400] conn=34 op=2 RESULT err=0 tag=101 nentries=0 etime=0 notes=U
[13/Oct/2016:16:20:46 -0400] conn=34 op=3 BIND dn="uid=test1,ou=People,dc=readycomputing,dc=com" method=128 version=3
[13/Oct/2016:16:20:46 -0400] conn=34 op=3 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=test1,ou=people,dc=readycomputing,dc=com"
[13/Oct/2016:16:20:46 -0400] conn=34 op=4 UNBIND
[13/Oct/2016:16:20:46 -0400] conn=34 op=4 fd=65 closed - U1
Server configuration
Operating system:
RHEL 7.2 fully updated
Web server:
[root@appserver public_html]# apachectl -V
Server version: Apache/2.4.6 (CentOS)
Server built: Jul 19 2016 13:15:57
Server's Module Magic Number: 20120211:24
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Database:
mysql Ver 15.1 Distrib 5.5.50-MariaDB, for Linux (x86_64) using readline
PHP version:
PHP 7.0.11 (cli) (built: Sep 14 2016 08:28:52) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Teampass version:
TeamPass-2.1.26-final-2
Updated from an older Teampass or fresh install:
both, but latest test on fresh install
Client configuration
Browser:
multiple, firefox, chrome, midori, all the same result
Operating system:
multiple, linux different flavors, windows, all the same result
Logs
Web server error log
Insert your webserver log here
[Thu Oct 13 16:20:46.650533 2016] [fcgid:warn] [pid 63232] [client 104.163.129.90:60844] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function user() on null in /home/teampamtmhyeb9zazvti/public_html/sources/identify.php:395, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650565 2016] [fcgid:warn] [pid 63232] [client 104.163.129.90:60844] mod_fcgid: stderr: Stack trace:, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650569 2016] [fcgid:warn] [pid 63232] [client 104.163.129.90:60844] mod_fcgid: stderr: #0 /home/teampamtmhyeb9zazvti/public_html/sources/identify.php(87): identifyUser('nuz/VxcXFxc/d/z...'), referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650573 2016] [fcgid:warn] [pid 63232] [client 104.163.129.90:60844] mod_fcgid: stderr: #1 {main}, referer: http://teampass.readycomputing.com/index.php?page=items
[Thu Oct 13 16:20:46.650577 2016] [fcgid:warn] [pid 63232] [client 104.163.129.90:60844] mod_fcgid: stderr: thrown in /home/teampamtmhyeb9zazvti/public_html/sources/identify.php on line 395, referer: http://teampass.readycomputing.com/index.php?page=items
Firebug log (How to?)
there is no response tab in firebug. There is a response header in headers tab:
Cache-Control
no-store, no-cache, must-revalidate
Connection
close
Content-Length
0
Content-Type
text/html; charset=utf-8
Date
Thu, 13 Oct 2016 20:20:46 GMT
Expires
Thu, 19 Nov 1981 08:52:00 GMT
Pragma
no-cache
Server
Apache/2.4.6
X-Powered-By
PHP/7.0.11
Parametersapplication/x-www-form-urlencodedDo not sort
6c120efbca80b0ca96f850919...
a02326dca60b8dbdcd6bec52a0843a80607480bf9c3a3bb28e
data
nuz/VxcXFxc/d/z9m+/p4bDTDkCjwIHnj1/n5un1WxevunB1esy+te91FPQ5vUMde+K6CxaFSHFvOCaSWAA6+QjnPX43Bv3SUtAiM1
+h30nXkW9Pnt4OHsRxNtYuf2MS5cHLNUIlNMHs1soQgwebPSIcG/4BSVs5fNBURCiP/5BYoyqgYa+amH8sfTzgwUc=
type
identify_user
Source
type=identify_user&data=nuz%2FVxcXFxc%2Fd%2Fz9m%2B%2Fp4bDTDkCjwIHnj1%2Fn5un1WxevunB1esy%2Bte91FPQ5vUMde
%2BK6CxaFSHFvOCaSWAA6%2BQjnPX43Bv3SUtAiM1%2Bh30nXkW9Pnt4OHsRxNtYuf2MS5cHLNUIlNMHs1soQgwebPSIcG%2F4BSVs5fNBURCiP
%2F5BYoyqgYa%2BamH8sfTzgwUc%3D&6c120efbca80b0ca96f850919b36e72ea54c0b378a66b8840a=a02326dca60b8dbdcd
6bec52a0843a80607480bf9c3a3bb28e
The text was updated successfully, but these errors were encountered: