Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » External Authenticator

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2 3 4 5 6 7
Go to End
Author Topic: 62880 Views
  • xzelan
    Avatar
    Community Member
    20 Posts

    Re: External Authenticator Link to this post

    I'm starting to get the hang of php now ;)

    I've put echo statements throughout the code and found that it only gets up to the line:

    self::$ds = @ldap_connect($uri, $port);

    Does the "@" mean it's an external function call, if not where do I find it so I can continue putting echo statements in?

    I've also confirmed that php is definately installed and it has version 5.1.4.4 of the php_ldap.dll file in C:\lighttpd\php\ext\

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: External Authenticator Link to this post

    "Does the "@" mean it's an external function call, if not where do I find it so I can continue putting echo statements in? "

    The @ suppresses error messages generated by the function call. Removing it should display any error messages ldap_connect($uri, $port); is generating.

  • xzelan
    Avatar
    Community Member
    20 Posts

    Re: External Authenticator Link to this post

    Thanks Simon. It's always interesting learning new languages by guess work

    Anyway, I think this (http://devzone.zend.com/manual/ref.ldap.html) might be relevant:

    "LDAP support in PHP is not enabled by default. You will need to use the --with-ldap[=DIR] configuration option when compiling PHP to enable LDAP support. DIR is the LDAP base install directory. To enable SASL support, be sure --with-ldap-sasl[=DIR] is used, and that sasl.h exists on the system.

    Note to Win32 Users: In order to enable this module on a Windows environment, you must copy several files from the DLL folder of the PHP/Win32 binary package to the SYSTEM folder of your windows machine. (Ex: C:\WINNT\SYSTEM32, or C:\WINDOWS\SYSTEM). For PHP <= 4.2.0 copy libsasl.dll, for PHP >= 4.3.0 copy libeay32.dll and ssleay32.dll to your SYSTEM folder."

    I've now copied libeay32.dll and ssleay32.dll into both system and system32.

    And I've downloaded php-5.2.5-win32-installer.msi so now I can hopefully install PHP with LDAP support...

  • lancer
    Avatar
    57 Posts

    Re: External Authenticator Link to this post

    @xzelan

    Good work. Let me know how it works out so I can update the wiki (and maybe alter the code to catch non-working connects)

  • xzelan
    Avatar
    Community Member
    20 Posts

    Re: External Authenticator Link to this post

    Installing the latest Lighttpd was easy. Installing the latest PHP was ok. Installing the latest MySQL correctly for SilverStripe was too hard for me. I didn't even get to integrating all three and getting SilverStripe running.

    Is there any chance of updating SilverStripe's Windows installer to the latest versions?

    ie:
    Lighttpd from 1.4.10 to 1.4.19
    MySQL from 5.0.24 to 5.0.51
    PHP from 5.1.4.4 to 5.2.5

    Especially as SilverStripe recommends PHP 5.2.0+ (http://doc.silverstripe.com/doku.php?id=server-requirements).

    I'm also puzzled that the server requirements page recommends using WAMP when their own Windows installer is a WLMP? (There is a WLMP site but sadly it's only in Hungarian http://en.wlmp-project.net/). Internally SilverStripe seem to prefer Lighttpd so I'm keen to follow their example but am not able.

  • Matt
    Avatar
    Core Development Team
    84 Posts

    Re: External Authenticator Link to this post

    When I worked in a Windows development environment, I used WAMP. We use lighty for the Windows installer because it's smaller and faster than Apache, and at the time SilverStripe was only confirmed as working on Apache, so we wanted to broaden the architectures we knew it supported.

    For what it's worth, here at SilverStripe we use LAMP stacks for all our servers, running debian. The remaining few who are still running Windows have either setup Apache/PHP/MySQL themselves or are using WAMP as far as I know.

    I'd suggest you setup WAMP and copy your site across - it shouldn't take much effort to get WAMP going.

    Matt.

  • xzelan
    Avatar
    Community Member
    20 Posts

    Re: External Authenticator Link to this post

    Thanks Matt.

    I got a WAMP working and finally got past the previous sticking point of the blank page

    However, I now get "Could not bind to LDAP server."

    The line of code:

    $bind = @ldap_bind(self::$ds, $bindas, $bindpw);

    What are your thoughts Lancer?

  • lancer
    Avatar
    57 Posts

    Re: External Authenticator Link to this post

    Wrong credentials? If it can connect, but not bind, it is often a case of a wrong dn or password. Do you have some ldap tools available on your system? (A directory browser would be handy). You can try connect the browser to the AD using the credentials and other settings you've set for the authenticator.

    Other policies in the AD may prevent you from connecting as well (e.g. IP based or domain membership based)

    62880 Views
Page: 1 2 3 4 5 6 7
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.