Apache PHP LDAPs Issue

Alles, was PHP betrifft, kann hier besprochen werden.

Apache PHP LDAPs Issue

Postby vkgandhi84 » 03. November 2011 22:59

I am working on Red Hat Enterprise Linux Server release 6.0 (Santiago).
I've installed Apache, Php, Open Ldap etc and wrote a chunk of code authenticating users across our ldap server over secure port which was working fine without any error a week ago.
Now I try this and gives me error PHP Warning: ldap_search(): Search: Can't contact LDAP server in /full_path/login_script.php on line 11
I added ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7); before I create connection to ldap server which gives me following output in error_log file.
put_filter: "(myLoginAttribute=testlogin@mydomain.edu*)"
put_filter: simple
put_simple_filter: "myLoginAttribute=testlogin@mydomain.edu*"
put_substring_filter "myLoginAttribute=testlogin@mydomain.edu*"
ldap_build_search_req ATTRS: *
ldap_new_connection 1 1 0
ldap_connect_to_host: TCP ldap.mydomain.edu:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying ldap_server_ip_address:636
ldap_pvt_connect: fd: 3 tm: -1 async: 0
ldap_close_socket: 3
PHP Warning: ldap_search(): Search: Can't contact LDAP server in /full_path/login_script.php on line 11

I've tried to execute the script from command line using php command and that works fine, but when I hit it from web browser it doesn't authenticate user and leaves the errors in error_log file.
I've been trying to find what has changed on my server since this was working absolutely fine with no error at all. It's very strange that it just stopped working without me touching any thing on the server where the script is running.

I'll really appreciate any type of help over this. Thanks to all who can be helpful.
Posts: 1
Joined: 03. November 2011 22:45
Operating System: Red Hat Enterprise Linux 6.0

Re: Apache PHP LDAPs Issue

Postby kylefarris » 10. November 2011 21:18

I'm having the same problem. I can connect to a Windows 2008 AD server via LDAPS with PHP 5.3 via the command line but it won't let me do it using the same exact script hosted via Apache. Any clues?
Posts: 1
Joined: 10. November 2011 21:16
Operating System: CentOS 6

Return to PHP

Who is online

Users browsing this forum: No registered users and 1 guest