LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-27-2005, 12:44 PM   #1
jtlawlor
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
lookup.

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

ldap_test.php:
------------------------------------------
<?php
$ldap_server = "ldap://10.0.0.3";
$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";
exit;
}
?>

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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:20 PM.

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