ID:               29895
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sonny at sun dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         LDAP related
 Operating System: Fedora Core 2
 PHP Version:      4.3.8, 5.0.1
 New Comment:

Do the openldap (assuming you're using openldap since you didn't say
what you actually use) CLI tools work?
This might be some weird permission issue. Maybe the user as what you
run the script doesn't have rights to read the ldap ini files or
something alike. 

And have you tried to run it on command line while you have Apache
running? (this shouldn't matter..but try run it when you've shutdown
Apache)



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

[2004-08-30 12:58:25] sonny at sun dot com

Description:
------------
Just using a simple Script to try to connect to an LDAP Server. (see
below)
If I execute this script via apache mod_php4 it works fine a I get an
Resource Handle back.
But using CLI cause the same script an connection failed.
The same behavior is in php 5.0.1.
Module ldap is laoded via php.ini, because it's shared compliled.

Reproduce code:
---------------
$ld = ldap_connect("ldap.example,com", "389");
print_r($ld);
ldap_close($ld);

Expected result:
----------------
Working as well in CLI as well as module/SAPI.

Actual result:
--------------
Connect failed in CLI.
[EMAIL PROTECTED] parser]$ php4 t.php 

Warning: ldap_close() expects parameter 1 to be resource, boolean given
in t.php on line 5



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


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

Reply via email to