PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Debugging Auth with LDAP

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Authentication
View previous topic :: View next topic  
Author Message
MKayHavoc



Joined: 27 Mar 2008
Posts: 4

PostPosted: Thu Mar 27, 2008 1:10 pm    Post subject: Debugging Auth with LDAP Reply with quote

I'm new to PEAR packages.

I'm wanting to use Auth to authenticate again Active Directory LDAP.

I've been looking over the package documentation, but it's not working. The problem i'm having is I'm getting no output telling me what's wrong.

Do I need to incorporate the Log package? If so, how is this done?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1051

PostPosted: Thu Mar 27, 2008 2:06 pm    Post subject: Reply with quote

Please insert the following lines at the beginning of your script:

Code:

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);


If you run your script then, you should get one or more error messages.
Back to top
View user's profile Send private message
MKayHavoc



Joined: 27 Mar 2008
Posts: 4

PostPosted: Thu Mar 27, 2008 6:14 pm    Post subject: Reply with quote

Cheers mate.
Back to top
View user's profile Send private message
MKayHavoc



Joined: 27 Mar 2008
Posts: 4

PostPosted: Fri Mar 28, 2008 1:11 pm    Post subject: Reply with quote

OK, i'm having some problems. I'm replacing my old LDAP authentication script with the Auth package. But i'm having trouble getting it working.

Using the same details I use for my script (which works), I get a:

Auth_Container_LDAP: Could not bind to LDAP server.

Does anyone know why?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1051

PostPosted: Fri Mar 28, 2008 4:43 pm    Post subject: Reply with quote

The Auth packages "silences" many errors with @. Activating the combination with the Log package could help in this case to get a reasonable description of the problem. The procedure is explained here:
http://pear.php.net/manual/en/package.authentication.auth.intro-logging.php
Back to top
View user's profile Send private message
MKayHavoc



Joined: 27 Mar 2008
Posts: 4

PostPosted: Mon Mar 31, 2008 12:00 pm    Post subject: Reply with quote

I've been running the debug logging and I get this:

PEAR_LOG_DEBUG level messages:
7: AUTH: Auth::start() called.
7: AUTH: Auth::assignData() called.
7: AUTH: Auth::checkAuth() called.
7: AUTH: Unable to locate session storage.
7: AUTH: Auth::login() called.
7: AUTH: Loaded storage container (LDAP)
7: AUTH: Auth_Container_LDAP::fetchData() called.
7: AUTH: Auth_Container_LDAP::_connect() called.
7: AUTH: Connecting with host:port
7: AUTH: Successfully connected to server
7: AUTH: Switching LDAP referrals to true
7: AUTH: Binding anonymously
7: AUTH: Bind failed
7: AUTH: LDAP ERROR: 81: Can't contact LDAP server
7: AUTH: Auth_Container_LDAP::_disconnect() called.
7: AUTH: disconnecting from server
6: AUTH: Incorrect login.
6: AUTH: Rendering Login Form.
7: AUTH: Using default Auth_Frontend_Html
7: AUTH: Auth::checkAuth() called.
7: AUTH: Unable to locate session storage.

It's trying to bind anonymously even though I've supplied a working account.

Any ideas?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Authentication All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software