PHPSocialNetwork / phpfastcache

A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
https://www.phpfastcache.com
MIT License
2.38k stars 451 forks source link

Mongodb failed to connect #795

Closed alfirus closed 3 years ago

alfirus commented 3 years ago

I try to use https://github.com/PHPSocialNetwork/phpfastcache/blob/master/docs/examples/mongodb.php

Then i edit the 'host', 'port', 'port','username' and 'password'.

Once i run in web browser, it shows error below

Fatal error: Uncaught Phpfastcache\Exceptions\PhpfastcacheDriverConnectException: Mongodb failed to connect with the following error message: "Authentication failed." line 114 in /vendor/mongodb/mongodb/src/Command/ListCollections.php in /vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php:82 Stack trace: #0 /vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php(190): Phpfastcache\Drivers\Mongodb\Driver->__construct() #1 test.php(25): Phpfastcache\CacheManager::getInstance() #2 {main} thrown in /vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php on line 82

github-actions[bot] commented 3 years ago

Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:

Geolim4 commented 3 years ago

Hello,

The issue template is here for a good reason.

Resubmit your issue with template filled.

Thanks.