php-windows Digest 19 Oct 2006 16:42:29 -0000 Issue 3060
Topics (messages 27245 through 27246):
Cookies - IE6
27245 by: KMiller
Using PHP to Bind over LDAPS.
27246 by: Phillip Terry
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I've spent an enormous amount of time trying to figure this out to no avail.
Firefox accepts cookies, no problem. IE6 accepts only the session cookie
but refuses to acknowledge a screen_res cookie. I've looked over the config
in IE over and over, set it to allow all cookies but it still refuses.
Moreover, the an xmlhttp request that sets a session variable won't work in
IE as well.
I'm setting the cookie thus:
snippet...
$screen_res = ($_COOKIE['screen_res']) ? $_COOKIE['screen_res'] :
$_SESSION['screen_res'];
switch ($screen_res) {
case '1024x768':
$this->siteResStyle=$config->getPath('styles') .
'/1024x768.css';
break;
case '1280x1024':
$this->siteResStyle=$config->getPath('styles') .
'/1280x1024.css';
break;
default:
$this->siteResStyle=$config->getPath('styles') .
'/1024x768.css';
}
$domain = $this->getDomain();
// Set expiration (30 days)
$expire = time() + (86400*30);
// Set the cookie
setcookie('screen_res', "{$_SESSION['screen_res']}", $expire, '/',
$domain,0,0);
I've gone so far as to establish a valid p3p profile just to cover that
possiblity as well.
Again, Firefox is perfect!
Any help, ideas welcome.
-km
--
View this message in context:
http://www.nabble.com/Cookies---IE6-tf2464072.html#a6869199
Sent from the Php - Windows mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
I configured LDAP for SSL (LDAPS) on the Active Directory (AD) Domain
Controller (DC).
The DC is a Windows 2003 Server box.
To do this I:
1) Setup the DC as a Certificate Authority (CA)
2) Issued a Certificate to itself
3) Issued a Certificate to the client that would be connecting via LDAPS
The client is configured in the following manner:
1) Windows 2003 Server Running IIS
2) PHP 5.0.4 installed
3) LDAP support enabled
- Uncommented the php_ldap.dll extension
- Copied the php_ldap.dll file into the appropriate directory
- Restarted IIS
Using the LDP tool, I was able to connect and bind via ports 389, 636, and 3269.
Here is the code I am using to attempt the bind:
<?php
$host = "ldaps://server.addomain.domain.com";
$un = "jdoe";
$pw = "password";
$lc = ldap_connect($host);
ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($lc, LDAP_OPT_REFERRALS, 0);
$lb = ldap_bind($lc, $un, $pw);
ldap_close($lc);
?>
If I change it to ldap://server.addomain.domain.com it functions correctly.
Is there a secure bind function I should know about?
Thanks for the help!
Phillip
--- End Message ---