PHP / LDAP on inexpensive hosting plan
For my log开发者_如何学Cin system, I would like to check a username and password against a remote LDAP server using PHP.
Can anyone tell me if just checking a user against LDAP will work on an inexpensive hosting plan from a company such as GoDaddy, 1&1, or Dreamhost?
Ex:
$objConn = ldap_connect($strDomain);
I don't want to run an LDAP server, just simply use the LDAP functions of PHP to verify an account.
The best option would be to email their respective support departments and ask this exact question; I'm sure they'll be able to help you. Everyone's setup is likely to be different, so this is probably the best approach. As long as the support is compiled-in and you've got network connectivity to your LDAP host (which you should probably access over SSL/TLS, if possible), you should be fine.
I'm a 10+ yr Dreamhost client and had this same question. The response from DH Support team was less than helpful, but I found this nugget:
The cURL library ('libcurl') ... currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols.
Source: https://help.dreamhost.com/hc/en-us/articles/216688028-cURL-overview
Also, very helpful cURL debugging info at https://curl.haxx.se/docs/httpscripting.html
Haven't gotten the authentication worked out just yet, but I'm getting closer with this.
精彩评论