Re: [PHP-DB] Ldap sasl bind(gssapi problem)

2010-03-28 Thread Chris

???  wrote:

Hallo there everyone,
after finishing my server side configuration so as to have the
maximum security
i tried this morning to do a sasl bind with my ldap server ,
my file looks like that:

*$ldapbind=ldap_sasl_bind($ldapconn,NULL,NULL,GSSAPI,TEIPIR.GR
,ldapmaster,dn:cn=ldapmas...@teipir.gr,ou=kerberos,dc=teipir,dc=gr);*
*// verify binding*
*
*
*   ** ** if ($ldapbind) {*
*echo LDAP bind successful... . br /;*
* *
every other mech i use seems to work fine but only the gssapi is not
workign from what i can see on the log
i have tried most of the additional commands i found on the net like:

putenv(KRB5CCNAME={$_SERVER['KRB5CCNAME']});



*but still nothing *
*any idea to make the bind over gssapi so as to have the kerveros ticket
exchange actually working*


You may have better luck asking on the php-general mailing list, there 
are a lot more people subscribed to that.


I've never tried anything relating to kerberos so unfortunately I don't 
have any particular suggestions.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Ldap sasl bind(gssapi problem)

2010-03-28 Thread Μανόλης Βλαχάκης
thanks for the advice!!
 i ll try my luck there



On 29 March 2010 01:11, Chris dmag...@gmail.com wrote:

 ???  wrote:

 Hallo there everyone,
 after finishing my server side configuration so as to have the
 maximum security
 i tried this morning to do a sasl bind with my ldap server ,
 my file looks like that:

 *$ldapbind=ldap_sasl_bind($ldapconn,NULL,NULL,GSSAPI,TEIPIR.GR
 ,ldapmaster,dn:cn=ldapmas...@teipir.gr
 ,ou=kerberos,dc=teipir,dc=gr);*
 *// verify binding*
 *
 *
 *   ** ** if ($ldapbind) {*
 *echo LDAP bind successful... . br /;*
 * *
 every other mech i use seems to work fine but only the gssapi is not
 workign from what i can see on the log
 i have tried most of the additional commands i found on the net like:

 putenv(KRB5CCNAME={$_SERVER['KRB5CCNAME']});



 *but still nothing *
 *any idea to make the bind over gssapi so as to have the kerveros ticket
 exchange actually working*


 You may have better luck asking on the php-general mailing list, there are
 a lot more people subscribed to that.

 I've never tried anything relating to kerberos so unfortunately I don't
 have any particular suggestions.

 --
 Postgresql  php tutorials
 http://www.designmagick.com/




-- 
Manolis Vlachakis

Nelly's Family Hotel
Visit:   www.nellys-hotel.gr
  www.nellys.gr
Skype : manolis.vlachakis


RE: [PHP-DB] ldap

2004-12-18 Thread Bastien Koert
here is something from google
http://www.koders.com/php/fid74E4E3B2ACC4C8436DBDE72016503DEB1AC54B47.aspx
http://www.wdvl.com/Authoring/Languages/PHP/Pro/

bastien
From: it clown [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] ldap
Date: Sat, 18 Dec 2004 10:41:29 +0200
Hi All,
How do i retreive info with php from w2k active directory.
I am running php from a linux box connecting to a windows
2000 domain controller.It seems asif i can connect to w2k
but i have noidea how to retreive the list of users.How
would i do that?
?php
$ldaphost = ldap://w2k.domain.net;;
$ldapport = 389;
$ldapuser = administrator;
$ldappasswd = ;
$ldaplink = ldap_connect($ldaphost, $ldapport)
or die(Can't establish LDAP connection);
ldap_bind($ldaplink, $ldapuser, $ldappasswd)
or die(Can't bind to server...);
?
_
For super low premiums, click here http://www.dialdirect.co.za/quote
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] ldap

2004-12-18 Thread it clown
Hi All,

I have googled abit and found some info on how to retrieve
user info from Active directory but i am getting the
following error for some reason:

Warning: ldap_search() [function.ldap-search]: Search:
Operations error in /srv/www/htdocs/ldap7.php on line 19

Warning: ldap_get_entries(): supplied argument is not a
valid ldap result resource in /srv/www/htdocs/ldap7.php on
line 21

Here is the script:

?php

$dn = OU=ldap,DN=w2k,DN=domain,DN=net;

$attributes = array(displayname, l);

$filter = (cn=*);

$ad = ldap_connect(ldap://w2k.domain.net;)
  or die(Couldn't connect to AD!);
  
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);

$bd = ldap_bind($ad,Administrator,)
  or die(Couldn't bind to AD!);

$result = ldap_search($ad, $dn, $filter, $attributes);

$entries = ldap_get_entries($ad, $result);

for ($i=0; $i$entries[count]; $i++)
{
echo $entries[$i][displayname]
 [0].(.$entries[$i][l][0].)br /;
}

ldap_unbind($ad);

?

Any help please, thanks?

Regards


On Sat, 18 Dec 2004 10:41:29 +0200
 it clown [EMAIL PROTECTED] wrote:
 Hi All,
 
 How do i retreive info with php from w2k active
 directory.
 I am running php from a linux box connecting to a windows
 2000 domain controller.It seems asif i can connect to w2k
 but i have noidea how to retreive the list of users.How
 would i do that?
 
 ?php
   $ldaphost = ldap://w2k.domain.net;;
   $ldapport = 389;
   $ldapuser = administrator;
   $ldappasswd = ;
   $ldaplink = ldap_connect($ldaphost, $ldapport)
   or die(Can't establish LDAP connection);
   
 ldap_bind($ldaplink, $ldapuser, $ldappasswd)
   or die(Can't bind to server...);
 ?

_
 For super low premiums, click here
 http://www.dialdirect.co.za/quote
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

_
For super low premiums, click here http://www.dialdirect.co.za/quote

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Ldap query problem

2004-07-15 Thread Swan, Nicole
Do you have some code you can provide so we can get a better idea of what you're 
trying to do?  

My guess is that the filter isn't set up quite right (as in the base dn you're 
attaching to get the dn is not formatted correctly).  What exactly are you trying to 
achieve?

--Nicole
---
Nicole Swan
Web Programming Specialist
Carroll College CCIT
(406)447-4310


-Original Message-
From: Ryan Jameson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 3:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Ldap query problem


My LDAP queries seem to have a problem with parenthesis, does anyone know
how to fix this?

Example...

Criteria  cn=Ryan Jameson* works fine returning user with cn=Ryan Jameson
(MyDomain)

But...

Criteria cn=Ryan Jameson (MyDomain) returns nothing. :-\

 Ryan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Ldap query problem

2004-07-15 Thread Ryan Jameson \(USA\)
I found it! The parenthesis need to be escaped, which I had tried, but
silly PHP went and escaped my escapes... :-\  So the criteria on the
query needed to be cn=Ryan Jameson \(MyDomain\) ... I was entering the
criteria via a form which PHP conveniently turned into cn=Ryan Jameson
\\(MyDomain\\) which didn't work. Thanks for the response!!!

 Ryan

-Original Message-
From: Swan, Nicole [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 15, 2004 4:01 PM
To: Ryan Jameson; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Ldap query problem

Do you have some code you can provide so we can get a better idea of
what you're trying to do?  

My guess is that the filter isn't set up quite right (as in the base dn
you're attaching to get the dn is not formatted correctly).  What
exactly are you trying to achieve?

--Nicole
---
Nicole Swan
Web Programming Specialist
Carroll College CCIT
(406)447-4310


-Original Message-
From: Ryan Jameson [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 3:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Ldap query problem


My LDAP queries seem to have a problem with parenthesis, does anyone
know how to fix this?

Example...

Criteria  cn=Ryan Jameson* works fine returning user with cn=Ryan
Jameson
(MyDomain)

But...

Criteria cn=Ryan Jameson (MyDomain) returns nothing. :-\

 Ryan

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] LDAP and special chars

2001-08-09 Thread Michael Rudel

Hi Christian,

... you could urlencode() when inserting and urldecode() on
fetching the data.

Perhaps this helps.

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
___

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
___



 -Original Message-
 From: Christian Chateauvieux [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 5:59 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] LDAP and special chars


 Hello,

 I am working with PHP 4.0.6 and OpenLDAP 2.0.11.
 I encounter problems when modifying some entries with
 attributes containing
 special chars (such as å, ø...). The error returned by the
 LDAP server is
 invalid syntax.

 I have read some documentation about this. OpenLDAP can accept
 base64-encoded values, provided we use the tools that come with the
 application (ldapadd, ldapmodify, etc.).
 Then the attributes in the entry would be separated from
 their values by a
 double column instead of the single colums used normally.

 i.e, the entry would be
 dn:uid=whatever,o=whatever
 normalAttribute: normalvalue
 specialAttribute:: SVN==   (this one is B64 encoded)

 But how to do this from PHP functions? I tried to
 base64_encode the values,
 it naturally didn't do the trick (those values were
 considered as normal,
 and thus were not decoded).

 Any idea?

 Thanks in advance


 Christian Chateauvieux



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] LDAP

2001-01-24 Thread Chris Andrew

Hi Thomas,

You are correct. You need to install ldap (openldap) prior to your PHP
install. Don't forget to install the ldap development files if you're
installing from rpm's. Then, when you configure your PHP:
/configure --with-ldap=your ldap install directory, probably /usr plus
other options ...

Chris

 -Original Message-
 From: Tom [mailto:[EMAIL PROTECTED]]
 Sent: 24 January 2001 11:56
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] LDAP


 Hello all,

 I've got a problem with PHP and LDAP.
 Every times, i want to connect to the serveur: I've got an error. It's
 "call to undefined funcion ldap_connect" !
 I have tried the php manual example but the error is the same...

 I think i've forget to put something like ./configure --ldap chen i
 havec compiled PHP4, no?

 (I have installed Apache+PgSQL+PHP4 before LDAP...)

 Thanks,
 Thomas
 [= http://www.56k.fr.st :=]

 PS: I'm  french, excuse me for my horrible english ;-)



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]