Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#15637 [Opn->Csd]: if using URI, ldap_connect() returns resource ID when server does not exist
ID:               15637
Updated by:       vrana@php.net
Reported By:      cjm46543 at hotmail dot com
-Status:           Open
+Status:           Closed
Bug Type:         Documentation problem
Operating System: Linux - RedHat 7.2
PHP Version:      4.4.0-dev


Previous Comments:
------------------------------------------------------------------------

[2004-11-30 23:02:42] nigel at cofa dot unsw dot edu dot au

Please delete my comment above.

I found the best solution for me was that I could test
whether I could do ldap_start_tls($myconnection), and
although this isn't perfect, works well enough for me
and is almost equivalent to testing whether the server
is available.

------------------------------------------------------------------------

[2004-11-30 22:41:29] nigel at cofa dot unsw dot edu dot au

So there is no way if we are using OpenLDAP to
distinguish betweeen:

* server is up and pingable
* LDAP server is running

?

------------------------------------------------------------------------

[2004-08-05 07:58:25] philip@php.net

I added sniper's comments to the ldap_connect() docs but am leaving
this bug report open until a doc member more familiar with LDAP can
close out this bug.  Here's the commit:

http://cvs.php.net/diff.php/phpdoc/.../>
=1.4&r2=1.5


------------------------------------------------------------------------

[2004-07-06 14:31:52] mitteljc at e-i dot com

My solution was to go one step further by using 'ldap_bind' to test the
connection :
$ds=ldap_connect("titi.tata.net");
$r=@ldap_bind($ds,"cn=toto","tutu");
if ($r) {
bla bla bla
}
else die("LDAP server not accessed !");
The '@' before 'ldap_bind' disables Warning dysplay.

------------------------------------------------------------------------

[2004-05-03 17:33:57] sanjay_ichalkaranje at yahoo dot com

I was trying to test my code which supposed to tell me whether a LDAP
server is alive and rechable or not. But no matter what IP address I
specified in ldap_connect it returned a valid resource.

I found a way out by first pinging the server to know whether its alive
and then trying to bind to know whether it is running LDAP.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15637

--
Edit this bug report at http://bugs.php.net/?id=15637&edit=1

Report this thread to moderator Post Follow-up to this message
Old Post
vrana@php.net
04-29-05 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:26 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.