Jump to content

[SOLVED] Authentication to AD server via LDAPS


geigers

Recommended Posts

Hi everyone, I hope someone can help with this.  Here is the situation.

 

I have a RHEL server running Apache 2.2.4 with PHP 5.2.4, compiled in LDAP and SSL.  I want to do authentication to an Active Directory server using LDAPS.  I have the certificate from that server.  I have converted it to PEM format. 

 

Now I am stuck.  I can connect and bind using standard LDAP (tcp 389) with PHP, but when I switch to LDAPS (tcp 636) I get a blank screen.  I have tried just about everything I can think of to diagnose this. 

 

From the command line I can issue: ldapsearch -H ldaps://x.x.x.x -D binduser -W -x and this works.

 

I also have a small php script which uses ldap_connect("ldaps://x.x.x.x") and then ldap_bind("binduser","password").  If I try to point my web browser at this script I get a blank page, if I switch it to ldap://x.x.x.x it works.  I also have tried running the php script from the command line via: php ldap_test2.php.  This works.  So it makes me suspect that there is a path and/or permissions error here, but I cannot figure out what or where?

 

Any help would be very much appreciated.

 

Thanks,

Scott Geiger

Systems Administrator

Binghamton University

 

Link to comment
Share on other sites

  • 3 weeks later...

SOLVED!

 

Well after digging deeper I found that the problem was more complicated.  I also have oci8 compiled into php in order to connect to my Oracle database.  It turns out that Oracle has ldap libs that were taking precedence over the openldap libs.  I found that Apache was seg faulting.  I finally ended up using gdb to backtrace a core dump.  After some heavy googling I found that Oracle was the culprit and the "fix" was to add an env-var to apachectl.  http://www.mail-archive.com/php-bugs@lists.php.net/msg02201.html

 

Scott Geiger

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.