Troubleshooting

Version 10 (Bryan Heath, 06/21/2012 06:28 pm)

1 1
h1. Troubleshooting
2 1
3 1
If you are having issues here are some steps  to try and help you figure out what is going on.
4 1
5 8 Bryan Heath
After you have read and tried all these you can post your issue on the forum:
6 8 Bryan Heath
http://forums.kayako.com/threads/php-ad-ldap-authenticator.24269/
7 8 Bryan Heath
8 9 Bryan Heath
+*Please remember to UNDO all the testing changes before going live!!!!!*+  This includes test mode since it will cause to you not be able to login
9 1
10 4 Bryan Heath
h1. First step
11 1
12 1
Read and check all the [[Installation]], [[Setup]] and [[Configure]] steps.  Many of the issues people have is they didnt follow each step correctly.
13 1
14 4 Bryan Heath
h1. Enable logging
15 1
16 1
* First make sure that /ldap/log/ is writable
17 1
* Open the ldap/config.php file
18 1
* Find:
19 1
** @define('KAYAKO_LDAP_LOG', false);@
20 1
* Change to:
21 1
** @define('KAYAKO_LDAP_LOG', true);@
22 1
* Now logging is enabled.  You can now try to login again, even if you know it will not work.  However if you go to /ldap/log/ you should see log.txt file.  In it there should be a log of what is going on.  This should help you track down the problem.
23 1
24 4 Bryan Heath
h1. Enable testing
25 1
	
26 1
* Open the ldap/config.php file
27 1
* Find:
28 6 Bryan Heath
<pre>define('KAYAKO_LDAP_USERNAME', 'username');
29 6 Bryan Heath
define('KAYAKO_LDAP_PASSWORD', 'password');</pre>
30 7 Bryan Heath
* Change the username and password to known good AD account (preferably your own).  So it should look like:
31 6 Bryan Heath
<pre>define('KAYAKO_LDAP_USERNAME', 'administrator');
32 6 Bryan Heath
define('KAYAKO_LDAP_PASSWORD', 'thepassword');</pre>
33 1
* Find:
34 1
** @define('KAYAKO_LDAP_TEST', false);@
35 1
* Change to:
36 1
** @define('KAYAKO_LDAP_TEST', true);@
37 3 Bryan Heath
* Now you are in testing mode.  If you go to the ldap.php you can now test those credentials and see if they work.  If they do you should get a [[Troubleshooting_XML|valid XML]] result.
38 1
39 10 Bryan Heath
You can also enable logging of the username and password sent to AD to ensure there is no problems with that.  By default its commented our for security.  To enable it:
40 10 Bryan Heath
* Open ldap.php
41 10 Bryan Heath
* Find:
42 10 Bryan Heath
** @		//$adldap->log('Username: '.$adldap->getUsername().' - Password: '.$adldap->getPassword());@
43 10 Bryan Heath
* Change to:
44 10 Bryan Heath
** @		$adldap->log('Username: '.$adldap->getUsername().' - Password: '.$adldap->getPassword());@
45 10 Bryan Heath
** Notice the // are now gone
46 10 Bryan Heath
47 10 Bryan Heath
48 4 Bryan Heath
h1. Try the ldap.html
49 1
50 3 Bryan Heath
In the tools folder you will find ldap.hml.  If you upload it and go to it, it will allow you to test different ldap users and see if you get a [[Troubleshooting_XML|valid XML]].
51 1
	
52 1
This is currently setup for testing users.  If you want to test staff:
53 1
	
54 1
* Open ldap.html
55 1
* Find:
56 1
** @<form action="ldap.php" method="post">@
57 5 Bryan Heath
* Replace with:
58 1
** @<form action="ldap.php?type=staff" method="post">@