From 2869120fb935b113d66ed476dcabf9a3569344b0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 27 Apr 2003 16:28:58 +0000 Subject: [PATCH] test for ldap.inc --- lam/tests/ldap-test.php | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 lam/tests/ldap-test.php diff --git a/lam/tests/ldap-test.php b/lam/tests/ldap-test.php new file mode 100644 index 00000000..36356e89 --- /dev/null +++ b/lam/tests/ldap-test.php @@ -0,0 +1,68 @@ +connect($user, $pass)) echo "ok"; + echo "
Check if __sleep/__wakeup works"; + $ldap->__sleep(); + $ldap->__wakeup(); + echo "
Closing connection"; + $ldap->destroy(); + echo "


If you do not see anny error messages all should be ok."; + exit; +} +else { + // generate 256 bit key and initialization vector for user/passwd-encryption + $key = mcrypt_create_iv(32, MCRYPT_DEV_RANDOM); + $iv = mcrypt_create_iv(32, MCRYPT_DEV_RANDOM); + + // save both in cookie + setcookie("Key", base64_encode($key), 0, "/"); + setcookie("IV", base64_encode($iv), 0, "/"); +} + +?> + + + + + <? + echo ("Login"); + ?> + + + +
+

Server URL:

+

Username:

+

Password:

+

+
+ +