LdapRecord: Can't load libraries after install
- Adldap2 Version: (LdapRecord)
- LDAP Type: Active Directory
- PHP Version: 7.2
Description:
When installing the composer file, I am getting an error after everything is installed, it appears as if the libraries are not loading properly. The error is:
Fatal error: Uncaught Error: Class 'LdapRecord\Connections\Connection' not found in /home/sso/www/_test.php:9 Stack trace: #0 {main} thrown in /home/sso/www/_test.php on line 9
The entire contents of the file is: require DIR . ‘/vendor/autoload.php’;
use LdapRecord\Connections\Container; use LdapRecord\Connections\Connection; use LdapRecord\Models\ActiveDirectory\Group;
$connection = new Connection([‘hosts’ => [‘192.168.1.1’], ‘base_dn’ => ‘dc=acme,dc=org’, ‘username’ => ‘user’, ‘password’ => ‘secret’,]);
I should at least get an error message that it can’t connect if it was loading the libraries properly.
Steps To Reproduce:
Using the following command to install:
runuser -l sso -c "composer install-v --working-dir=/home/sso/www"
I have downloaded the composer.json file and adjusted it as I was getting and error about a dependency. It’s exactly the same as the original, except I changed "phpunit/phpunit": "*",
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (9 by maintainers)
No worries at all, there is a learning curve to any new implementation. I’m going to have to read through the documentation a little more. Haha.
The example you provided works beautifully. Thank you for all your hard work!
Yup that’s my bad, I modified the above example, I made several mistakes while writing it originally that I fixed.
It’s located in the following namespace:
Sorry about that!
Also no worries! I’m still working on more examples - I have all of the API documentation done, but I’m definitely going to be adding more examples from your suggestions.