psecio / gatekeeper

Gatekeeper: An Authentication & Authorization Library
366 stars 23 forks source link

Issue at install (Solved) #68

Closed Crack019 closed 7 years ago

Crack019 commented 7 years ago

I use Ubuntu 16.04. Nginx server and installed with composer.

I create Database ok, i can connect to mysql correct. Gatekeeper create database and returns Ok.

But in call the init function:

require_once 'vendor/autoload.php';
use \Psecio\Gatekeeper\Gatekeeper;

Gatekeeper::init();

I returned fatal error:

"PHP message: PHP Fatal error: Uncaught Error: Class 'psecio\gatekeeper\Gatekeeper' not found in /var/www/html/index.php:12

Perhaps is Composer error, i don't know. Require_once is ok but use fails.

enygma commented 7 years ago

Hmm, yeah, that sounds like a Composer issue. Also, I noticed in the error message the Psecio is lower case - did you mistype that or is that how it is in your code? If it's lowercase I don't believe the Composer autoloading will find it correctly.

Crack019 commented 7 years ago

Thanks for quick answer.

I have tried lowercase in several times because Composer install in rute with lowercase. Now i passed this fatal error.

Now i have this: "PHP message: PHP Fatal error: Uncaught InvalidArgumentException: Configuration values must be defined! in /var/www/html/vendor/psecio/gatekeeper/src/Psecio/Gatekeeper/Gatekeeper.php:96

This error afraid me less than other, i try to config Gatekeeper now.

Edit: Actually I have no error forcing my custom $config in Gatekeeper init.

enygma commented 7 years ago

That just means that the .env file it is expecting in the local directory isn't there. Check out the install instructions for more information on setting it all up.