skip to Main Content

Hello everyone I’ve been searching pretty much all day on the internet with no results, I only get windows results and that doesn’t make me very happy since I need to get this thing working on my machine and I don’t want to have to install a windows virtual machine on purpose.

I’m on local and I’m using XAMPP on macos latest version, I’m trying to get a result of success out of this, when I go to create a php file linked to my ldap I don’t get any kind of result, I even tried with a test public ldap but nothing, I’ve already enabled from the php.ini file the ldap function and it gives me enabled so I don’t know what I’m doing wrong, on windows they refer to .dll files but I don’t have them on mac, can someone help me out? thanks!

the public ldap I’m trying is this: https://www.forumsys.com/2022/05/10/online-ldap-test-server/

The file is this:

<?php
$ldap_dn = "cn=read-only-admin,dc=example,dc=com";
$ldap_password = "password";

$ldap_con = ldap_connect("ldap.forumsys.com");

ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);

if(ldap_bind($ldap_con, $ldap_dn, $ldap_password)){
  echo "bind successful";
} else {
  echo "Not successful";
}
?>

and when I open it in local it say this to me:

Page not working

localhost did not send data.

ERR_EMPTY_RESPONSE

2

Answers


  1. Chosen as BEST ANSWER

    Edit: I just changed the application I'm working on, now I'm using MAMP and ldap file works fine, maybe XAMPP on mac is not good to work with ldap data.


  2. I switched from MAMP to XAMPP because MAMP didn’t include mod_ldap and mod_authz_ldap modules. How were you able to get access to these modules in MAMP? I’d prefer to use that instead as I can’t get XAMPP to do what I need.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search