Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 09-27-2005, 12:44 PM   #1
LQ Newbie
Registered: Sep 2005
Distribution: fedora - suse
Posts: 1

Rep: Reputation: 0
Autheniticating PHP+LDAP+AD - stopped working.

Ran Yum Update on FC3 Linux server - which updated httpd, ldap, php etc. Afterward, the php code for a connection to the ldap server (windows 2003) stopped working, for Apache LDAP authentication and ldap

error as follows:
Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in ldap_test.php on line 23

$ldap_server = "ldap://";
$ldap_base_dn = "cn=Users,dc=Company,dc=local";
$ldap_def_user = "cn=domain\user,cn=Users,dc=Company,dc=local";
$ldap_def_pass = "pword";

$ld_connect = @ldap_connect("$ldap_server");

ldap_set_option($ld_connect, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ld_connect, LDAP_OPT_REFERRALS, 0);

// the offending line below
$bind = ldap_bind($ld_connect, "hb\jtlawlor", "jaareL01");

if(!$bind) {
print "Cannot bind to ldap server. $ldap_server $ld_connect";

This still works: (from the FC command line)
ldapsearch -x -D "domain\user" -s sub -b "cn=Users,dc=Company,dc=local" "(objectclass=user)" -w "pword"

Again, up until the update - this worked fine !!!

Server particulars:
Fedora 3 - standard install.
Apache, PHP and ldap were installed from rpm's - not compiled.

Windows 2003 - AD tree.

current verisons after update:
Apache (httpd) - 2.0.53
PHP Version 4.3.11
OpenLDAP Version 20213

Note: I have google searched this for the past two days... tried many different ways to connect and bind to the ldap server

Any Ideas? I may try install of FC4 on another box to see if that works.

John Lawlor.
jtlawlor[at]sbcglobal dot net


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
php + ldap berrance General 4 08-17-2005 05:57 AM
mysql stopped working with new php xushi Slackware 2 04-08-2005 10:43 AM
Php + Mssql + Ldap lewus Linux - Software 4 01-27-2005 02:48 AM
PHP with LDAP-support senorsnor Slackware 1 08-07-2004 07:32 PM
Short question PHP + LDAP Hko Programming 2 08-07-2004 10:04 AM > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration