Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

LDAP and Active Directory Plugin: Missing LDAP2.php

We are trying to get the LDAP plugin running on our osticket v1.9.1 (it was upgraded from v1.7 to 1.8 to 1.9)
We did not test or install the plugin on 1.8.x version, we skipped this version.

First we downloaded the phar file and copied it to plugins folder on server. The admin page to manage and install the plugin did not found any available plugins. So we finally downloaded the github files and put them into plugin folder. Now we were able to install the plugin successfully.

Trying to configure the plugin fails. If we enter the needed credentials and save them we get a white page. If we check the settings after that again we can see, that nothing was saved. Because we guessed it could be browser related we switched to IE. There we get an error 500, if we watch the details of it we can see where the problem is:

http://****/tickets/scp/plugins.php?id=1
Warning: require_once(include/Net/LDAP2.php): failed to open stream: No such file or directory in /var/www/****/include/plugins/auth-ldap/config.php on line 119 Fatal error: require_once(): Failed opening required 'include/Net/LDAP2.php' (include_path='./:/var/www/****/include/:/var/www/****/include/pear/:/var/www/****/include/plugins/auth-ldap/include') in /var/www/****/include/plugins/auth-ldap/config.php on line 119

I can't find any LDAP2.PHP on our server. Why is this file missing from our osticket installation / plugin folder and how can we fix it?

Comments

  • Interesting. 

    I've point out this thread to the devs, you will probably want to make a issue report on github.
  • edited June 2014
    first of all, I am a Chinese, hope you can understand what I say blow.

    • I guess what made your fault should be like this:
      • You downloaded from git, and move the files to /plugins/auth-ldap. After that you add a new plugin.
      • If that, it is wrong. You must read README with the files. You can see that it let you run "php make.php ***"/
      • This command will help you to download some dependence, include Net_LDAP2. 
    • My suggestion:
      • download phar file from osticket.com directly.
      • php -r '$phar = new Phar("auth-passthru.phar"); $phar->extractTo("./auth-passthru");'
      • just mv the dir to /plugins and add it.
      • for me it has errors, I do it like this:
        • find function getConnection in authentication.php, change it like below:
          • foreach ($this->getServers() as $s) {
          •             $params = $defaults + $s;
          •             $c = new Net_LDAP2($params);
          •             return $c;
          •             // delete by qinguoan
          •             //this will return a empty $c
          •             //$r = $c->bind();
          •             //if (!PEAR::isError($r)) {
          •             //    $connection = $c;
          •             //    return $c;
          •             //}
          •         }
      • Now it works for me, may be also for you.
  • Just a thought... Maybe a permission issue?
    Did you change the owner of the .phar file after copying, so that the webserver is able to access the phar?
  • The permissions were fine, checked/corrected them first when we ran into problems.

    Many thanks to qinguoan! Using make.php with github files was not successfull, there was some error using curl.

    But extracting the phar like described above finaly solved all our problems. There was no need to edit authentication.php, it worked out of the box after we had the extracted phar which came with the missing file ldap2.php.
Sign In or Register to comment.