SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php/LDAP install on windows XP

    I would like to know if anyone has configured Open LDAP on Windows XP enviroment. I have WAMP installed on my computer (Apache2.2.8, php5.2.6, MySQL 5.0.51).

    My boss is asking me to build an intranet site. Here is what should happen:
    1. The php application will recognizes who the users are using Active Directory information without having to log in again.
    2. Be able to pull employee information from Active Directory (eg, name, department, hire date, etc...)

    I did some reearch and find that the solution is to use PHP/LDAP. But LDAP is for Linux/Unix environment. And I have no clue how to make the configuration for my Windows XP.

    I'm quite new to PHP and LDAP. Any help is greatly appreciated!

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I hate to break it to you, but your users ARE going to have to log in again. They would still only have to provide their domain credentials, but have to log in nevertheless.

    PHP has various LDAP functions already, you should be able to just target your Domain Controller as the LDAP server.

    SilverB.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My question now isn't that far. I'm trying to configure IDAP for my PHP/Apache on Windows XP.

    Here is what I've done:
    1. included two modules in apache httpd.conf file: LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    and LoadModule ldap_module modules/mod_ldap.so
    2. aslo add this to php.ini file: extension=php_ldap.dll

    Then I looked at phpinfo() page, and see "ldap" information as follows:

    LDAP Support: enabled
    RCS Version: $Id: ldap.c,v 1.161.2.3.2.12 2007/12/31 07:20:07 sebastian Exp $
    Total Links: 0/unlimited
    API version: 2004
    Vendor Name: OpenLDAP
    Vendor Version: 0

    Why the version is "0"?

    so I try to make a ldap_connect() like this:
    <?php
    $ds = ldap_connect("localhost") or die("could not connect to server");
    ?>

    It won't connect to the localhost.

    Can somebody help me on this? I assume there is something wrong with my PHP/LDAP configuration. Thanks and sorry for the lenghty decription.

  4. #4
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    It your PC a Domain Controller?

    If not, it won't work. The extension's you're loading will only allow to connect to a DC not run one.

    SilverB.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, my PC is not a domain Controller. Does that mean I need to get the valid LDAP server name instead of putting "localhost" in order to retrieve the directory information? By the way, is there any configuration that needs to be done on my own PC?

  6. #6
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •